diff options
author | bradnelson <bradnelson@google.com> | 2014-09-15 19:30:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 02:33:15 +0000 |
commit | 5c5b64142652bfa57a4309602892765b889350dc (patch) | |
tree | e624cfbbd9600b7ab1deb06685c23ae3410b2082 | |
parent | a75e8729dc917c0089a725e67fa2e9feaec0baef (diff) | |
download | chromium_src-5c5b64142652bfa57a4309602892765b889350dc.zip chromium_src-5c5b64142652bfa57a4309602892765b889350dc.tar.gz chromium_src-5c5b64142652bfa57a4309602892765b889350dc.tar.bz2 |
Build only the appropriate x86 arches for nacl (chrome side).
BUG=https://code.google.com/p/chromium/issues/detail?id=388101
TEST=local + with trybots
R=mseaborn@chromium.org,jam@chromium.org,brettw@chromium.org
Review URL: https://codereview.chromium.org/452543002
Cr-Commit-Position: refs/heads/master@{#294987}
-rw-r--r-- | build/common_untrusted.gypi | 13 | ||||
-rw-r--r-- | ppapi/native_client/native_client.gyp | 14 | ||||
-rw-r--r-- | ppapi/ppapi_nacl.gyp | 60 | ||||
-rw-r--r-- | ppapi/ppapi_nacl_test_common.gypi | 2 |
4 files changed, 66 insertions, 23 deletions
diff --git a/build/common_untrusted.gypi b/build/common_untrusted.gypi index 086264e..bcc3686 100644 --- a/build/common_untrusted.gypi +++ b/build/common_untrusted.gypi @@ -10,6 +10,17 @@ ], 'target_defaults': { 'conditions': [ + # TODO(bradnelson): Drop this once the nacl side does the same. + ['target_arch=="x64"', { + 'variables': { + 'enable_x86_32': 0, + }, + }], + ['target_arch=="ia32" and OS!="win"', { + 'variables': { + 'enable_x86_64': 0, + }, + }], ['target_arch=="arm"', { 'variables': { 'clang': 1, @@ -26,4 +37,4 @@ }], ], }, -}
\ No newline at end of file +} diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp index 977af54..91f081b 100644 --- a/ppapi/native_client/native_client.gyp +++ b/ppapi/native_client/native_client.gyp @@ -45,6 +45,10 @@ 'src/shared/ppapi_proxy/ppruntime.h', ], }, + ], + }], + ['target_arch=="ia32"', { + 'copies': [ # Here we copy linker scripts out of the Native Client repo.. # These are source, not build artifacts. { @@ -54,16 +58,20 @@ ], }, { - 'destination': '>(tc_lib_dir_newlib64)', + 'destination': '>(tc_lib_dir_glibc32)', 'files': [ 'src/untrusted/irt_stub/libppapi.a', + 'src/untrusted/irt_stub/libppapi.so', ], }, + ], + }], + ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { + 'copies': [ { - 'destination': '>(tc_lib_dir_glibc32)', + 'destination': '>(tc_lib_dir_newlib64)', 'files': [ 'src/untrusted/irt_stub/libppapi.a', - 'src/untrusted/irt_stub/libppapi.so', ], }, { diff --git a/ppapi/ppapi_nacl.gyp b/ppapi/ppapi_nacl.gyp index a93fdb9..1d75eed 100644 --- a/ppapi/ppapi_nacl.gyp +++ b/ppapi/ppapi_nacl.gyp @@ -8,7 +8,7 @@ { 'includes': [ - '../native_client/build/untrusted.gypi', + '../build/common_untrusted.gypi', 'ppapi_sources.gypi', ], 'targets': [ @@ -100,24 +100,26 @@ '-O0', ], 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'extra_deps_newlib64': [ - '>(tc_lib_dir_newlib64)/libppapi_cpp.a', - '>(tc_lib_dir_newlib64)/libppapi.a', - ], + ['target_arch=="ia32"', { 'extra_deps_newlib32': [ '>(tc_lib_dir_newlib32)/libppapi_cpp.a', '>(tc_lib_dir_newlib32)/libppapi.a', ], - 'extra_deps_glibc64': [ - '>(tc_lib_dir_glibc64)/libppapi_cpp.so', - '>(tc_lib_dir_glibc64)/libppapi.so', - ], 'extra_deps_glibc32': [ '>(tc_lib_dir_glibc32)/libppapi_cpp.so', '>(tc_lib_dir_glibc32)/libppapi.so', ], }], + ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { + 'extra_deps_newlib64': [ + '>(tc_lib_dir_newlib64)/libppapi_cpp.a', + '>(tc_lib_dir_newlib64)/libppapi.a', + ], + 'extra_deps_glibc64': [ + '>(tc_lib_dir_glibc64)/libppapi_cpp.so', + '>(tc_lib_dir_glibc64)/libppapi.so', + ], + }], ['target_arch=="arm"', { 'extra_deps_arm': [ '>(tc_lib_dir_newlib_arm)/libppapi_cpp.a', @@ -140,7 +142,7 @@ 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', }, 'conditions': [ - ['target_arch!="arm" and target_arch!="mipsel" and disable_glibc==0', { + ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { 'variables': { 'build_glibc': 1, # NOTE: Use /lib, not /lib64 here; it is a symbolic link which @@ -155,7 +157,7 @@ 'action_name': 'Generate GLIBC NMF and copy libs', # NOTE: create_nmf must be first, it is the script python executes # below. - 'inputs': ['>(create_nmf)', '>(out_glibc64)', '>(out_glibc32)'], + 'inputs': ['>(create_nmf)'], # NOTE: There is no explicit dependency for the lib32 # and lib64 directories created in the PRODUCT_DIR. # They are created as a side-effect of NMF creation. @@ -164,13 +166,25 @@ 'python', '>@(_inputs)', '--objdump=>(nacl_objdump)', - '--library-path=>(libdir_glibc64)', - '--library-path=>(libdir_glibc32)', - '--library-path=>(tc_lib_dir_glibc32)', - '--library-path=>(tc_lib_dir_glibc64)', '--output=>(nmf_glibc)', '--stage-dependencies=<(PRODUCT_DIR)', ], + 'conditions': [ + ['target_arch=="ia32"', { + 'action': [ + '--library-path=>(libdir_glibc32)', + '--library-path=>(tc_lib_dir_glibc32)', + ], + 'inputs': ['>(out_glibc32)'], + }], + ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { + 'action': [ + '--library-path=>(libdir_glibc64)', + '--library-path=>(tc_lib_dir_glibc64)', + ], + 'inputs': ['>(out_glibc64)'], + }], + ], }, ], }], @@ -199,8 +213,6 @@ # below. 'inputs': [ '>(create_nmf)', - '>(out_pnacl_newlib_x86_32_nexe)', - '>(out_pnacl_newlib_x86_64_nexe)' ], 'outputs': ['>(nmf_pnacl)'], 'action': [ @@ -208,6 +220,18 @@ '>@(_inputs)', '--output=>(nmf_pnacl)', ], + 'conditions': [ + ['target_arch=="ia32"', { + 'inputs': [ + '>(out_pnacl_newlib_x86_32_nexe)', + ], + }], + ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { + 'inputs': [ + '>(out_pnacl_newlib_x86_64_nexe)', + ], + }], + ], }, ], }], diff --git a/ppapi/ppapi_nacl_test_common.gypi b/ppapi/ppapi_nacl_test_common.gypi index 55ea63d..3ebd8a0 100644 --- a/ppapi/ppapi_nacl_test_common.gypi +++ b/ppapi/ppapi_nacl_test_common.gypi @@ -4,7 +4,7 @@ { 'includes': [ - '../native_client/build/untrusted.gypi', + '../build/common_untrusted.gypi', ], 'target_defaults': { # We need to override the variables in untrusted.gypi outside of a |