summaryrefslogtreecommitdiffstats
path: root/base/base.gyp
diff options
context:
space:
mode:
authorbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 18:43:44 +0000
committerbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 18:43:44 +0000
commit83c1c3c6ceaa3e4e9543914d1d9e45d9d42dadcc (patch)
tree017189efdbf5cc0f38ea5a6bf050a296b6a46897 /base/base.gyp
parent3fb684ed0c79e96ad98a5eea8960373da75d29b3 (diff)
downloadchromium_src-83c1c3c6ceaa3e4e9543914d1d9e45d9d42dadcc.zip
chromium_src-83c1c3c6ceaa3e4e9543914d1d9e45d9d42dadcc.tar.gz
chromium_src-83c1c3c6ceaa3e4e9543914d1d9e45d9d42dadcc.tar.bz2
Moving all targets from base.gypi to base.gyp.
Originally base.gypi was intended to sequester the syntactic trick used to instantiate base as both regular Win32 base and base_nacl_win64. The intention was to keep all the magic in one place. It's unclear if this is a real advantage. In a coming CL we will want to instantiate base a third time as a nacl module. Rather than do that in base.gyp (bringing in a nacl dependency), we will instead add base_untrusted.gyp in this directory. Repositioning everything outside target_defaults in base.gypi will allow us to include it in two places. All targets and conditional targets are moved to base.gyp. BUG=None TEST=builds R=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/10532040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base.gyp')
-rw-r--r--base/base.gyp358
1 files changed, 358 insertions, 0 deletions
diff --git a/base/base.gyp b/base/base.gyp
index ff2c21f..6666640 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -12,6 +12,232 @@
],
'targets': [
{
+ 'target_name': 'base',
+ 'type': '<(component)',
+ 'toolsets': ['host', 'target'],
+ 'variables': {
+ 'base_target': 1,
+ 'enable_wexit_time_destructors': 1,
+ 'optimize': 'max',
+ },
+ 'dependencies': [
+ 'base_static',
+ 'allocator/allocator.gyp:allocator_extension_thunks',
+ '../testing/gtest.gyp:gtest_prod',
+ '../third_party/modp_b64/modp_b64.gyp:modp_b64',
+ 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ ],
+ # TODO(gregoryd): direct_dependent_settings should be shared with the
+ # 64-bit target, but it doesn't work due to a bug in gyp
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ 'conditions': [
+ [ 'use_glib==1', {
+ 'conditions': [
+ [ 'chromeos==1', {
+ 'sources/': [ ['include', '_chromeos\\.cc$'] ]
+ },
+ ],
+ [ 'linux_use_tcmalloc==0', {
+ 'defines': [
+ 'NO_TCMALLOC',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'NO_TCMALLOC',
+ ],
+ },
+ },
+ ],
+ [ 'toolkit_uses_gtk==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:gtk',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:gtk',
+ ],
+ }],
+ ],
+ 'dependencies': [
+ 'symbolize',
+ '../build/linux/system.gyp:glib',
+ '../build/linux/system.gyp:x11',
+ 'xdg_mime',
+ ],
+ 'defines': [
+ 'USE_SYMBOLIZE',
+ ],
+ 'cflags': [
+ '-Wno-write-strings',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:glib',
+ '../build/linux/system.gyp:x11',
+ ],
+ }, { # use_glib!=1
+ 'sources/': [
+ ['exclude', '/xdg_user_dirs/'],
+ ['exclude', '_nss\.cc$'],
+ ],
+ }],
+ [ 'OS == "android" and _toolset == "host"', {
+ # Base for host support is the minimum required to run the
+ # ssl false start blacklist tool. It requires further changes
+ # to generically support host builds (and tests).
+ # Note: when building for host, gyp has OS == "android",
+ # hence the *_android.cc files are included but the actual code
+ # doesn't have OS_ANDROID / ANDROID defined.
+ 'conditions': [
+ # Host build on linux depends on system.gyp::gtk as
+ # default linux build has TOOLKIT_GTK defined.
+ ['host_os == "linux"', {
+ 'sources/': [
+ ['include', '^atomicops_internals_x86_gcc\\.cc$'],
+ ],
+ 'dependencies': [
+ '../build/linux/system.gyp:gtk',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:gtk',
+ ],
+ }],
+ ['host_os == "mac"', {
+ 'sources/': [
+ ['exclude', '^native_library_linux\\.cc$'],
+ ['exclude', '^process_util_linux\\.cc$'],
+ ['exclude', '^sys_info_linux\\.cc$'],
+ ['exclude', '^sys_string_conversions_linux\\.cc$'],
+ ['exclude', '^worker_pool_linux\\.cc$'],
+ ],
+ }],
+ ],
+ }],
+ [ 'OS == "android" and _toolset == "target"', {
+ 'conditions': [
+ ['target_arch == "ia32"', {
+ 'sources/': [
+ ['include', '^atomicops_internals_x86_gcc\\.cc$'],
+ ],
+ }],
+ ],
+ 'dependencies': [
+ 'symbolize',
+ '../third_party/ashmem/ashmem.gyp:ashmem',
+ '../third_party/icu/icu.gyp:icuuc',
+ 'base_java',
+ 'base_jni_headers',
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/base',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-llog',
+ ],
+ },
+ 'defines': [
+ 'USE_SYMBOLIZE',
+ ],
+ 'sources!': [
+ 'debug/stack_trace.cc',
+ 'debug/stack_trace_posix.cc',
+ ],
+ }],
+ [ 'os_bsd==1', {
+ 'include_dirs': [
+ '/usr/local/include',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-L/usr/local/lib -lexecinfo',
+ ],
+ },
+ },
+ ],
+ [ 'OS == "linux"', {
+ 'link_settings': {
+ 'libraries': [
+ # We need rt for clock_gettime().
+ '-lrt',
+ # For 'native_library_linux.cc'
+ '-ldl',
+ ],
+ },
+ }],
+ [ 'OS == "mac"', {
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+ '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
+ '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Security.framework',
+ ],
+ },
+ 'dependencies': [
+ '../third_party/mach_override/mach_override.gyp:mach_override',
+ ],
+ }],
+ [ 'OS != "win"', {
+ 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
+ },],
+ [ 'component=="shared_library"', {
+ 'conditions': [
+ ['OS=="win"', {
+ 'sources!': [
+ 'debug/debug_on_start_win.cc',
+ ],
+ }],
+ ],
+ }],
+ ],
+ 'sources': [
+ 'third_party/nspr/prcpucfg.h',
+ 'third_party/nspr/prcpucfg_win.h',
+ 'third_party/nspr/prtypes.h',
+ 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
+ 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
+ 'auto_reset.h',
+ 'base64.cc',
+ 'base64.h',
+ 'event_recorder.h',
+ 'event_recorder_stubs.cc',
+ 'event_recorder_win.cc',
+ 'file_descriptor_shuffle.cc',
+ 'file_descriptor_shuffle.h',
+ 'linux_util.cc',
+ 'linux_util.h',
+ 'md5.cc',
+ 'md5.h',
+ 'message_pump_android.cc',
+ 'message_pump_android.h',
+ 'message_pump_glib.cc',
+ 'message_pump_glib.h',
+ 'message_pump_gtk.cc',
+ 'message_pump_gtk.h',
+ 'message_pump_observer.h',
+ 'message_pump_aurax11.cc',
+ 'message_pump_aurax11.h',
+ 'message_pump_libevent.cc',
+ 'message_pump_libevent.h',
+ 'message_pump_mac.h',
+ 'message_pump_mac.mm',
+ 'metrics/field_trial.cc',
+ 'metrics/field_trial.h',
+ 'string16.cc',
+ 'string16.h',
+ 'sync_socket.h',
+ 'sync_socket_win.cc',
+ 'sync_socket_posix.cc',
+ 'time_mac.cc',
+ 'time_posix.cc',
+ ],
+ },
+ {
'target_name': 'base_i18n',
'type': '<(component)',
'variables': {
@@ -535,6 +761,138 @@
},
],
'conditions': [
+ [ 'OS == "win"', {
+ 'targets': [
+ {
+ 'target_name': 'base_nacl_win64',
+ 'type': '<(component)',
+ 'variables': {
+ 'base_target': 1,
+ },
+ 'dependencies': [
+ 'base_static_win64',
+ 'allocator/allocator.gyp:allocator_extension_thunks_win64',
+ 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
+ ],
+ # TODO(gregoryd): direct_dependent_settings should be shared with the
+ # 32-bit target, but it doesn't work due to a bug in gyp
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ 'defines': [
+ '<@(nacl_win64_defines)',
+ ],
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ 'conditions': [
+ [ 'component == "shared_library"', {
+ 'sources!': [
+ 'debug/debug_on_start_win.cc',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'base_i18n_nacl_win64',
+ 'type': '<(component)',
+ # TODO(gregoryd): direct_dependent_settings should be shared with the
+ # 32-bit target, but it doesn't work due to a bug in gyp
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ 'defines': [
+ '<@(nacl_win64_defines)',
+ 'BASE_I18N_IMPLEMENTATION',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'i18n/icu_util_nacl_win64.cc',
+ ],
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ },
+ ],
+ }],
+ [ 'os_posix==1 and OS!="mac"', {
+ 'targets': [
+ {
+ 'target_name': 'symbolize',
+ 'type': 'static_library',
+ 'toolsets': ['host', 'target'],
+ 'variables': {
+ 'chromium_code': 0,
+ },
+ 'conditions': [
+ [ 'OS == "solaris"', {
+ 'include_dirs': [
+ '/usr/gnu/include',
+ '/usr/gnu/include/libelf',
+ ],
+ },],
+ ],
+ 'cflags': [
+ '-Wno-sign-compare',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ ],
+ 'sources': [
+ 'third_party/symbolize/config.h',
+ 'third_party/symbolize/demangle.cc',
+ 'third_party/symbolize/demangle.h',
+ 'third_party/symbolize/glog/logging.h',
+ 'third_party/symbolize/glog/raw_logging.h',
+ 'third_party/symbolize/symbolize.cc',
+ 'third_party/symbolize/symbolize.h',
+ 'third_party/symbolize/utilities.h',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ {
+ 'target_name': 'xdg_mime',
+ 'type': 'static_library',
+ 'toolsets': ['host', 'target'],
+ 'variables': {
+ 'chromium_code': 0,
+ },
+ 'cflags!': [
+ '-Wextra',
+ ],
+ 'sources': [
+ 'third_party/xdg_mime/xdgmime.c',
+ 'third_party/xdg_mime/xdgmime.h',
+ 'third_party/xdg_mime/xdgmimealias.c',
+ 'third_party/xdg_mime/xdgmimealias.h',
+ 'third_party/xdg_mime/xdgmimecache.c',
+ 'third_party/xdg_mime/xdgmimecache.h',
+ 'third_party/xdg_mime/xdgmimeglob.c',
+ 'third_party/xdg_mime/xdgmimeglob.h',
+ 'third_party/xdg_mime/xdgmimeicon.c',
+ 'third_party/xdg_mime/xdgmimeicon.h',
+ 'third_party/xdg_mime/xdgmimeint.c',
+ 'third_party/xdg_mime/xdgmimeint.h',
+ 'third_party/xdg_mime/xdgmimemagic.c',
+ 'third_party/xdg_mime/xdgmimemagic.h',
+ 'third_party/xdg_mime/xdgmimeparent.c',
+ 'third_party/xdg_mime/xdgmimeparent.h',
+ ],
+ },
+ ],
+ }],
['OS == "android"', {
'targets': [
{