summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/base.gyp138
-rw-r--r--base/base.gypi40
-rw-r--r--base/base_untrusted.gyp35
3 files changed, 126 insertions, 87 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 6666640..d3b2021 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -35,24 +35,22 @@
],
},
'conditions': [
- [ 'use_glib==1', {
+ ['use_glib==1', {
'conditions': [
- [ 'chromeos==1', {
- 'sources/': [ ['include', '_chromeos\\.cc$'] ]
- },
- ],
- [ 'linux_use_tcmalloc==0', {
+ ['chromeos==1', {
+ 'sources/': [ ['include', '_chromeos\\.cc$'] ]
+ }],
+ ['linux_use_tcmalloc==0', {
+ 'defines': [
+ 'NO_TCMALLOC',
+ ],
+ 'direct_dependent_settings': {
'defines': [
'NO_TCMALLOC',
],
- 'direct_dependent_settings': {
- 'defines': [
- 'NO_TCMALLOC',
- ],
- },
},
- ],
- [ 'toolkit_uses_gtk==1', {
+ }],
+ ['toolkit_uses_gtk==1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
@@ -83,7 +81,7 @@
['exclude', '_nss\.cc$'],
],
}],
- [ 'OS == "android" and _toolset == "host"', {
+ ['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).
@@ -115,7 +113,7 @@
}],
],
}],
- [ 'OS == "android" and _toolset == "target"', {
+ ['OS == "android" and _toolset == "target"', {
'conditions': [
['target_arch == "ia32"', {
'sources/': [
@@ -146,28 +144,27 @@
'debug/stack_trace_posix.cc',
],
}],
- [ 'os_bsd==1', {
+ ['os_bsd==1', {
'include_dirs': [
'/usr/local/include',
],
'link_settings': {
'libraries': [
'-L/usr/local/lib -lexecinfo',
- ],
- },
+ ],
},
- ],
- [ 'OS == "linux"', {
+ }],
+ ['OS == "linux"', {
'link_settings': {
- 'libraries': [
- # We need rt for clock_gettime().
- '-lrt',
- # For 'native_library_linux.cc'
- '-ldl',
- ],
- },
+ 'libraries': [
+ # We need rt for clock_gettime().
+ '-lrt',
+ # For 'native_library_linux.cc'
+ '-ldl',
+ ],
+ },
}],
- [ 'OS == "mac"', {
+ ['OS == "mac"', {
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
@@ -182,10 +179,10 @@
'../third_party/mach_override/mach_override.gyp:mach_override',
],
}],
- [ 'OS != "win"', {
+ ['OS != "win"', {
'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
},],
- [ 'component=="shared_library"', {
+ ['component=="shared_library"', {
'conditions': [
['OS=="win"', {
'sources!': [
@@ -761,7 +758,7 @@
},
],
'conditions': [
- [ 'OS == "win"', {
+ ['OS == "win"', {
'targets': [
{
'target_name': 'base_nacl_win64',
@@ -790,7 +787,7 @@
},
},
'conditions': [
- [ 'component == "shared_library"', {
+ ['component == "shared_library"', {
'sources!': [
'debug/debug_on_start_win.cc',
],
@@ -825,7 +822,7 @@
},
],
}],
- [ 'os_posix==1 and OS!="mac"', {
+ ['os_posix==1 and OS!="mac"', {
'targets': [
{
'target_name': 'symbolize',
@@ -835,7 +832,7 @@
'chromium_code': 0,
},
'conditions': [
- [ 'OS == "solaris"', {
+ ['OS == "solaris"', {
'include_dirs': [
'/usr/gnu/include',
'/usr/gnu/include/libelf',
@@ -942,41 +939,41 @@
],
}],
['OS=="mac"', {
- 'targets': [
- {
- 'target_name': 'closure_blocks_leopard_compat',
- 'sources': [
- 'mac/closure_blocks_leopard_compat.h',
- ],
- 'conditions': [
- ['mac_sdk == "10.5"', {
- 'type': 'shared_library',
- 'product_name': 'closure_blocks_leopard_compat_stub',
- 'variables': {
- # This target controls stripping directly. See below.
- 'mac_strip': 0,
- },
- 'sources': [
- 'mac/closure_blocks_leopard_compat.S',
- ],
- 'xcode_settings': {
- # These values are taken from libSystem.dylib in the 10.5
- # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
- # against this stub library to look for the symbols it
- # provides in the real libSystem at runtime. When using ld
- # from Xcode 4 or later (ld64-123.2 and up), giving two
- # libraries with the same "install name" to the linker will
- # cause it to print "ld: warning: dylibs with same install
- # name". This is harmless, and ld will behave as intended
- # here.
- #
- # The real library's compatibility version is used, and the
- # value of the current version from the SDK is used to make
- # it appear as though anything linked against this stub was
- # linked against the real thing.
- 'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
- 'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
- 'DYLIB_CURRENT_VERSION': '111.1.4',
+ 'targets': [
+ {
+ 'target_name': 'closure_blocks_leopard_compat',
+ 'sources': [
+ 'mac/closure_blocks_leopard_compat.h',
+ ],
+ 'conditions': [
+ ['mac_sdk == "10.5"', {
+ 'type': 'shared_library',
+ 'product_name': 'closure_blocks_leopard_compat_stub',
+ 'variables': {
+ # This target controls stripping directly. See below.
+ 'mac_strip': 0,
+ },
+ 'sources': [
+ 'mac/closure_blocks_leopard_compat.S',
+ ],
+ 'xcode_settings': {
+ # These values are taken from libSystem.dylib in the 10.5
+ # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
+ # against this stub library to look for the symbols it
+ # provides in the real libSystem at runtime. When using ld
+ # from Xcode 4 or later (ld64-123.2 and up), giving two
+ # libraries with the same "install name" to the linker will
+ # cause it to print "ld: warning: dylibs with same install
+ # name". This is harmless, and ld will behave as intended
+ # here.
+ #
+ # The real library's compatibility version is used, and the
+ # value of the current version from the SDK is used to make
+ # it appear as though anything linked against this stub was
+ # linked against the real thing.
+ 'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
+ 'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
+ 'DYLIB_CURRENT_VERSION': '111.1.4',
# Turn on stripping (yes, even in debug mode), and add the -c
# flag. This is what produces a stub library (MH_DYLIB_STUB)
@@ -1025,7 +1022,8 @@
'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',],
},
'includes': [ '../build/apk_test.gypi' ],
- }],
+ },
+ ],
}],
],
}
diff --git a/base/base.gypi b/base/base.gypi
index 3457c59..b77b4d8 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -331,7 +331,7 @@
'synchronization/waitable_event.h',
'synchronization/waitable_event_posix.cc',
'synchronization/waitable_event_watcher.h',
- 'synchronization/waitable_event_watcher_posix.cc',
+ 'synchronization/waitable_event_watcher_posix.cc',
'synchronization/waitable_event_watcher_win.cc',
'synchronization/waitable_event_win.cc',
'system_monitor/system_monitor.cc',
@@ -481,8 +481,8 @@
'mac_framework_dirs': [
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
],
- 'conditions': [
- [ 'use_glib==0', {
+ 'target_conditions': [
+ ['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '^nix/'],
],
@@ -492,17 +492,23 @@
'message_pump_aurax11.cc',
],
}],
- [ 'toolkit_uses_gtk==0', {
- 'sources!': [ 'message_pump_gtk.cc', ],
+ ['<(toolkit_uses_gtk)==0 or >(nacl_untrusted_build)==1', {
+ 'sources!': ['message_pump_gtk.cc'],
}],
- [ 'OS != "linux" and os_bsd != 1', {
+ ['(OS != "linux" and <(os_bsd) != 1) or >(nacl_untrusted_build)==1', {
'sources!': [
# Not automatically excluded by the *linux.cc rules.
'linux_util.cc',
],
},
],
- [ 'OS == "android"', {
+ ['>(nacl_untrusted_build)==1', {
+ 'sources!': [
+ 'file_util.cc',
+ 'files/file_path_watcher_kqueue.cc',
+ ],
+ }],
+ ['OS == "android" and >(nacl_untrusted_build)==0', {
'sources!': [
'files/file_path_watcher_kqueue.cc',
'system_monitor/system_monitor_posix.cc',
@@ -514,30 +520,30 @@
['include', '^worker_pool_linux\\.cc$'],
],
}],
- [ 'OS != "mac"', {
+ ['OS != "mac" or >(nacl_untrusted_build)==1', {
'sources!': [
'mac/scoped_aedesc.h'
],
}],
# For now, just test the *BSD platforms enough to exclude them.
# Subsequent changes will include them further.
- [ 'OS != "freebsd"', {
+ ['OS != "freebsd" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
},
],
- [ 'OS != "openbsd"', {
+ ['OS != "openbsd" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
},
],
- ['OS != "win"', {
+ ['OS != "win" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '^win/'] ],
},
],
- ['OS != "android"', {
+ ['OS != "android" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '^android/'] ],
},
],
- [ 'OS == "win"', {
+ ['OS == "win" and >(nacl_untrusted_build)==0', {
'include_dirs': [
'<(DEPTH)/third_party/wtl/include',
],
@@ -553,13 +559,13 @@
'string16.cc',
],
},],
- [ 'OS == "linux"', {
+ ['OS == "linux" and >(nacl_untrusted_build)==0', {
'sources!': [
'files/file_path_watcher_kqueue.cc',
'files/file_path_watcher_stub.cc',
],
}],
- [ 'OS == "mac"', {
+ ['OS == "mac" and >(nacl_untrusted_build)==0', {
'sources/': [
['exclude', '^files/file_path_watcher_stub\\.cc$'],
['exclude', '^base_paths_posix\\.cc$'],
@@ -567,7 +573,7 @@
['exclude', '^sys_string_conversions_posix\\.cc$'],
],
}],
- [ 'os_bsd==1', {
+ ['<(os_bsd)==1 and >(nacl_untrusted_build)==0', {
'sources/': [
['exclude', '^files/file_path_watcher_linux\\.cc$'],
['exclude', '^files/file_path_watcher_stub\\.cc$'],
@@ -577,7 +583,7 @@
['exclude', '^sys_info_linux\\.cc$'],
],
}],
- [ 'chromeos != 1', {
+ ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '^chromeos/'],
],
diff --git a/base/base_untrusted.gyp b/base/base_untrusted.gyp
new file mode 100644
index 0000000..917e2170
--- /dev/null
+++ b/base/base_untrusted.gyp
@@ -0,0 +1,35 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../native_client/build/untrusted.gypi',
+ 'base.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'base_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'base_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libbase_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
+ '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
+ ],
+ },
+ ],
+ }],
+ ],
+}