summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 05:06:10 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 05:06:10 +0000
commit490e66d36a28f5df028cbba3425d6ab93755af9e (patch)
tree923240f27789c0f2d58af213a0ceb42fa0f28550 /base
parent98ec812bc5ca61b7d17c38a69d6b91b1aae23c76 (diff)
downloadchromium_src-490e66d36a28f5df028cbba3425d6ab93755af9e.zip
chromium_src-490e66d36a28f5df028cbba3425d6ab93755af9e.tar.gz
chromium_src-490e66d36a28f5df028cbba3425d6ab93755af9e.tar.bz2
Build a version of base with -fPIC turned on. Use it for internal plugin. Credit to bradnelson who did this.
Review URL: http://codereview.chromium.org/2796002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/base.gypi382
1 files changed, 217 insertions, 165 deletions
diff --git a/base/base.gypi b/base/base.gypi
index fd9ea54..557156d 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -6,6 +6,7 @@
'target_defaults': {
'variables': {
'base_target': 0,
+ 'base_extra_target': 0,
},
'target_conditions': [
# This part is shared between the targets defined below. Only files and
@@ -352,6 +353,179 @@
},],
],
}],
+ ['base_extra_target', {
+ 'sources': [
+ 'crypto/cssm_init.cc',
+ 'crypto/cssm_init.h',
+ 'crypto/encryptor.h',
+ 'crypto/encryptor_mac.cc',
+ 'crypto/encryptor_nss.cc',
+ 'crypto/encryptor_win.cc',
+ 'crypto/rsa_private_key.h',
+ 'crypto/rsa_private_key.cc',
+ 'crypto/rsa_private_key_mac.cc',
+ 'crypto/rsa_private_key_nss.cc',
+ 'crypto/rsa_private_key_win.cc',
+ 'crypto/signature_creator.h',
+ 'crypto/signature_creator_mac.cc',
+ 'crypto/signature_creator_nss.cc',
+ 'crypto/signature_creator_win.cc',
+ 'crypto/signature_verifier.h',
+ 'crypto/signature_verifier_mac.cc',
+ 'crypto/signature_verifier_nss.cc',
+ 'crypto/signature_verifier_win.cc',
+ 'crypto/symmetric_key.h',
+ 'crypto/symmetric_key_mac.cc',
+ 'crypto/symmetric_key_nss.cc',
+ 'crypto/symmetric_key_win.cc',
+ 'third_party/nspr/prcpucfg.h',
+ 'third_party/nspr/prcpucfg_win.h',
+ 'third_party/nspr/prtypes.h',
+ 'third_party/nss/blapi.h',
+ 'third_party/nss/blapit.h',
+ 'third_party/nss/sha256.h',
+ 'third_party/nss/sha512.cc',
+ 'third_party/purify/pure.h',
+ 'third_party/purify/pure_api.c',
+ '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',
+ 'base_drag_source.cc',
+ 'base_drag_source.h',
+ 'base_drop_target.cc',
+ 'base_drop_target.h',
+ 'data_pack.cc',
+ 'event_recorder.cc',
+ 'event_recorder.h',
+ 'event_recorder_stubs.cc',
+ 'field_trial.cc',
+ 'field_trial.h',
+ 'file_descriptor_shuffle.cc',
+ 'file_descriptor_shuffle.h',
+ 'hmac.h',
+ 'hmac_mac.cc',
+ 'hmac_nss.cc',
+ 'hmac_win.cc',
+ 'image_util.cc',
+ 'image_util.h',
+ 'json/json_reader.cc',
+ 'json/json_reader.h',
+ 'json/json_writer.cc',
+ 'json/json_writer.h',
+ 'json/string_escape.cc',
+ 'json/string_escape.h',
+ 'keyboard_code_conversion_gtk.cc',
+ 'keyboard_code_conversion_gtk.h',
+ 'keyboard_codes.h',
+ 'keyboard_codes_win.h',
+ 'keyboard_codes_posix.h',
+ 'linux_util.cc',
+ 'linux_util.h',
+ 'md5.cc',
+ 'md5.h',
+ 'message_pump_glib.cc',
+ 'message_pump_glib.h',
+ 'message_pump_libevent.cc',
+ 'message_pump_libevent.h',
+ 'message_pump_mac.h',
+ 'message_pump_mac.mm',
+ 'nsimage_cache_mac.h',
+ 'nsimage_cache_mac.mm',
+ 'nss_util.cc',
+ 'nss_util.h',
+ 'setproctitle_linux.c',
+ 'setproctitle_linux.h',
+ 'sha2.cc',
+ 'sha2.h',
+ 'string16.cc',
+ 'string16.h',
+ 'sync_socket.h',
+ 'sync_socket_win.cc',
+ 'sync_socket_posix.cc',
+ 'time_mac.cc',
+ 'time_posix.cc',
+ 'version.cc',
+ 'version.h',
+ ],
+ 'conditions': [
+ [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
+ 'conditions': [
+ [ 'chromeos==1', {
+ 'sources/': [ ['include', '_chromeos\\.cc$'] ]
+ },
+ ],
+ [ 'linux_use_tcmalloc==0', {
+ 'defines': [
+ 'NO_TCMALLOC',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'NO_TCMALLOC',
+ ],
+ },
+ },
+ ],
+ [ 'OS == "linux"', {
+ 'link_settings': {
+ 'libraries': [
+ # We need rt for clock_gettime().
+ '-lrt',
+ # For 'native_library_linux.cc'
+ '-ldl',
+ ],
+ },
+ }],
+ ],
+ 'defines': [
+ 'USE_SYMBOLIZE',
+ ],
+ 'cflags': [
+ '-Wno-write-strings',
+ ],
+ },],
+ [ 'OS == "freebsd" or OS == "openbsd"', {
+ 'link_settings': {
+ 'libraries': [
+ '-L/usr/local/lib -lexecinfo',
+ ],
+ },
+ },
+ ],
+ [ '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',
+ ],
+ },
+ },],
+ [ 'OS != "win"', {
+ 'sources!': [
+ 'third_party/purify/pure_api.c',
+ 'base_drag_source.cc',
+ 'base_drop_target.cc',
+ 'cpu.cc',
+ 'debug_on_start.cc',
+ 'event_recorder.cc',
+ 'file_version_info.cc',
+ 'iat_patch.cc',
+ 'image_util.cc',
+ 'object_watcher.cc',
+ 'pe_image.cc',
+ 'registry.cc',
+ 'resource_util.cc',
+ 'win_util.cc',
+ 'wmi_util.cc',
+ ],
+ },],
+ ],
+ }],
],
},
'targets': [
@@ -361,6 +535,7 @@
'msvs_guid': '1832A374-8A74-4F9E-B536-69A699B3E165',
'variables': {
'base_target': 1,
+ 'base_extra_target': 1,
},
'dependencies': [
'../third_party/modp_b64/modp_b64.gyp:modp_b64',
@@ -373,79 +548,27 @@
'..',
],
},
- # Conditions that are not relevant for Win64 build
'conditions': [
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
'conditions': [
- [ 'chromeos==1', {
- 'sources/': [ ['include', '_chromeos\\.cc$'] ]
- },
- ],
- [ 'linux_use_tcmalloc==0', {
- 'defines': [
- 'NO_TCMALLOC',
- ],
- 'direct_dependent_settings': {
- 'defines': [
- 'NO_TCMALLOC',
- ],
- },
- },
- ],
[ 'linux_use_tcmalloc==1', {
'dependencies': [
'allocator/allocator.gyp:allocator',
],
},
],
- [ 'OS == "linux"', {
- 'link_settings': {
- 'libraries': [
- # We need rt for clock_gettime().
- '-lrt',
- # For 'native_library_linux.cc'
- '-ldl',
- ],
- },
- }],
],
'dependencies': [
+ 'symbolize',
'../build/util/build_util.gyp:lastchange',
'../build/linux/system.gyp:gtk',
'../build/linux/system.gyp:nss',
- 'symbolize',
'xdg_mime',
],
- 'defines': [
- 'USE_SYMBOLIZE',
- ],
- 'cflags': [
- '-Wno-write-strings',
- ],
'export_dependent_settings': [
'../build/linux/system.gyp:gtk',
],
},],
- [ 'OS == "freebsd" or OS == "openbsd"', {
- 'link_settings': {
- 'libraries': [
- '-L/usr/local/lib -lexecinfo',
- ],
- },
- },
- ],
- [ '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',
- ],
- },
- },],
[ 'OS == "mac" or OS == "win"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
@@ -453,120 +576,8 @@
},],
[ 'OS != "win"', {
'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
- 'sources!': [
- 'third_party/purify/pure_api.c',
- 'base_drag_source.cc',
- 'base_drop_target.cc',
- 'cpu.cc',
- 'debug_on_start.cc',
- 'event_recorder.cc',
- 'file_version_info.cc',
- 'iat_patch.cc',
- 'image_util.cc',
- 'object_watcher.cc',
- 'pe_image.cc',
- 'registry.cc',
- 'resource_util.cc',
- 'win_util.cc',
- 'wmi_util.cc',
- ],
},],
],
- 'sources': [
- 'crypto/cssm_init.cc',
- 'crypto/cssm_init.h',
- 'crypto/encryptor.h',
- 'crypto/encryptor_mac.cc',
- 'crypto/encryptor_nss.cc',
- 'crypto/encryptor_win.cc',
- 'crypto/rsa_private_key.h',
- 'crypto/rsa_private_key.cc',
- 'crypto/rsa_private_key_mac.cc',
- 'crypto/rsa_private_key_nss.cc',
- 'crypto/rsa_private_key_win.cc',
- 'crypto/signature_creator.h',
- 'crypto/signature_creator_mac.cc',
- 'crypto/signature_creator_nss.cc',
- 'crypto/signature_creator_win.cc',
- 'crypto/signature_verifier.h',
- 'crypto/signature_verifier_mac.cc',
- 'crypto/signature_verifier_nss.cc',
- 'crypto/signature_verifier_win.cc',
- 'crypto/symmetric_key.h',
- 'crypto/symmetric_key_mac.cc',
- 'crypto/symmetric_key_nss.cc',
- 'crypto/symmetric_key_win.cc',
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_win.h',
- 'third_party/nspr/prtypes.h',
- 'third_party/nss/blapi.h',
- 'third_party/nss/blapit.h',
- 'third_party/nss/sha256.h',
- 'third_party/nss/sha512.cc',
- 'third_party/purify/pure.h',
- 'third_party/purify/pure_api.c',
- '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',
- 'base_drag_source.cc',
- 'base_drag_source.h',
- 'base_drop_target.cc',
- 'base_drop_target.h',
- 'data_pack.cc',
- 'event_recorder.cc',
- 'event_recorder.h',
- 'event_recorder_stubs.cc',
- 'field_trial.cc',
- 'field_trial.h',
- 'file_descriptor_shuffle.cc',
- 'file_descriptor_shuffle.h',
- 'hmac.h',
- 'hmac_mac.cc',
- 'hmac_nss.cc',
- 'hmac_win.cc',
- 'image_util.cc',
- 'image_util.h',
- 'json/json_reader.cc',
- 'json/json_reader.h',
- 'json/json_writer.cc',
- 'json/json_writer.h',
- 'json/string_escape.cc',
- 'json/string_escape.h',
- 'keyboard_code_conversion_gtk.cc',
- 'keyboard_code_conversion_gtk.h',
- 'keyboard_codes.h',
- 'keyboard_codes_win.h',
- 'keyboard_codes_posix.h',
- 'linux_util.cc',
- 'linux_util.h',
- 'md5.cc',
- 'md5.h',
- 'message_pump_glib.cc',
- 'message_pump_glib.h',
- 'message_pump_libevent.cc',
- 'message_pump_libevent.h',
- 'message_pump_mac.h',
- 'message_pump_mac.mm',
- 'nsimage_cache_mac.h',
- 'nsimage_cache_mac.mm',
- 'nss_util.cc',
- 'nss_util.h',
- 'setproctitle_linux.c',
- 'setproctitle_linux.h',
- 'sha2.cc',
- 'sha2.h',
- 'string16.cc',
- 'string16.h',
- 'sync_socket.h',
- 'sync_socket_win.cc',
- 'sync_socket_posix.cc',
- 'time_mac.cc',
- 'time_posix.cc',
- 'version.cc',
- 'version.h',
- ],
},
],
'conditions': [
@@ -603,6 +614,47 @@
},
],
}],
+ [ 'OS == "linux" and target_arch=="x64" and internal_pdf', {
+ 'targets': [
+ {
+ 'target_name': 'base_fpic',
+ 'type': '<(library)',
+ 'variables': {
+ 'base_target': 1,
+ 'base_extra_target': 1,
+ },
+ 'cflags': [
+ '-fPIC',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ 'conditions': [
+ [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', {
+ 'dependencies': [
+ '../build/util/build_util.gyp:lastchange',
+ '../build/linux/system.gyp:gtk',
+ '../build/linux/system.gyp:nss',
+ 'xdg_mime',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:gtk',
+ ],
+ },],
+ [ 'OS == "mac" or OS == "win"', {
+ 'dependencies': [
+ '../third_party/nss/nss.gyp:nss',
+ ],
+ },],
+ [ 'OS != "win"', {
+ 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
+ },],
+ ],
+ },
+ ],
+ }],
[ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
'targets': [
{