summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordschuff <dschuff@chromium.org>2014-10-28 12:11:26 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 19:11:41 +0000
commit5d16ece519b7901d7c7530773815dca0a007abab (patch)
tree36617b2d46101c8314f4373422b30ce8402531e2
parent2727608b406a9c198469e186853da57eacb105d2 (diff)
downloadchromium_src-5d16ece519b7901d7c7530773815dca0a007abab.zip
chromium_src-5d16ece519b7901d7c7530773815dca0a007abab.tar.gz
chromium_src-5d16ece519b7901d7c7530773815dca0a007abab.tar.bz2
Add support for using custom PNaCl translator within the chromium gyp build.
Similar to NaCl r13990, this adds a gyp variable pnacl_translator_dir to specify a directory containing a built PNaCl translator to package into Chromium, which overrides the default behavior (which is to use the translator downloaded by package_version.py based on the NaCl DEPS). R=dyen@chromium.org,jvoung@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3954 Review URL: https://codereview.chromium.org/681133002 Cr-Commit-Position: refs/heads/master@{#301677}
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp66
1 files changed, 47 insertions, 19 deletions
diff --git a/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp b/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp
index db0c603..dd58e1e 100644
--- a/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp
+++ b/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp
@@ -8,28 +8,56 @@
'includes': [
'../../../../../build/common_untrusted.gypi',
],
+ 'variables': {
+ 'pnacl_translator_dir%': "",
+ 'pnacl_translator_stamp%': "pnacl_translator.json",
+ },
'targets': [
{
'target_name': 'untar_pnacl_translator',
'type': 'none',
- 'actions': [{
- 'action_name': 'Untar pnacl_translator',
- 'description': 'Untar pnacl_translator',
- 'inputs': [
- '<(DEPTH)/native_client/build/package_version/package_version.py',
- '<(DEPTH)/native_client/toolchain/.tars/<(TOOLCHAIN_OS)_x86/pnacl_translator.json',
- ],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator/pnacl_translator.json'],
- 'action': [
- 'python',
- '<(DEPTH)/native_client/build/package_version/package_version.py',
- '--quiet',
- '--packages', 'pnacl_translator',
- '--tar-dir', '<(DEPTH)/native_client/toolchain/.tars',
- '--dest-dir', '<(SHARED_INTERMEDIATE_DIR)/sdk',
- 'extract',
- ],
- }],
+ 'conditions': [
+ ['pnacl_translator_dir==""', {
+ 'actions': [{
+ 'action_name': 'Untar pnacl_translator',
+ 'description': 'Untar pnacl_translator',
+ 'inputs': [
+ '<(DEPTH)/native_client/build/package_version/package_version.py',
+ '<(DEPTH)/native_client/toolchain/.tars/<(TOOLCHAIN_OS)_x86/pnacl_translator.json',
+ ],
+ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator/<(pnacl_translator_stamp)'],
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/package_version/package_version.py',
+ '--quiet',
+ '--packages', 'pnacl_translator',
+ '--tar-dir', '<(DEPTH)/native_client/toolchain/.tars',
+ '--dest-dir', '<(SHARED_INTERMEDIATE_DIR)/sdk',
+ 'extract',
+ ],
+ }],
+ }, {
+ 'actions': [{
+ 'action_name': 'Copy pnacl_translator',
+ 'description': 'Copy pnacl_translator',
+ 'inputs': [
+ '<(DEPTH)/native_client/build/copy_directory.py',
+ '<(pnacl_translator_dir)/<(pnacl_translator_stamp)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator/<(pnacl_translator_stamp)'],
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/copy_directory.py',
+ '--quiet',
+ '--stamp-arg', 'pnacl_translator_stamp',
+ '--stamp-file', '<(pnacl_translator_stamp)',
+ '<(pnacl_translator_dir)',
+ '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator',
+ ],
+ }],
+ }],
+ ],
},
{
'target_name': 'pnacl_support_extension',
@@ -52,7 +80,7 @@
'inputs': [
'pnacl_component_crx_gen.py',
# A stamp file representing the contents of pnacl_translator.
- '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator/pnacl_translator.json',
+ '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_translator/<(pnacl_translator_stamp)',
'<(DEPTH)/native_client/pnacl/driver/pnacl_info_template.json',
'<(DEPTH)/native_client/toolchain_revisions/pnacl_newlib.json',
],