[email protected] | 0c678ce | 2014-02-27 00:46:11 | [diff] [blame] | 1 | # Copyright 2014 The Chromium Authors. All rights reserved. |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | # This GYP file defines untrusted (NaCl) targets. All targets in this |
| 6 | # file should be conditionally depended upon via 'disable_nacl!=1' to avoid |
| 7 | # requiring NaCl sources for building. |
| 8 | |
| 9 | { |
| 10 | 'includes': [ |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 11 | '../build/common_untrusted.gypi', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 12 | 'ppapi_sources.gypi', |
| 13 | ], |
| 14 | 'targets': [ |
| 15 | { |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 16 | 'target_name': 'nacl_elf_loader', |
| 17 | 'type': 'none', |
| 18 | 'conditions': [ |
| 19 | ['target_arch=="arm" and disable_glibc==0', { |
| 20 | 'dependencies': [ |
| 21 | '<(DEPTH)/native_client/src/untrusted/elf_loader/elf_loader.gyp:elf_loader_nexe', |
| 22 | ], |
| 23 | 'actions': [ |
| 24 | { |
| 25 | 'action_name': 'copy_arm_elf_loader', |
| 26 | 'message': 'Copying elf_loader_arm.nexe', |
| 27 | 'inputs': [ |
| 28 | '<(PRODUCT_DIR)/elf_loader_newlib_arm.nexe', |
| 29 | ], |
| 30 | 'outputs': [ |
| 31 | '>(tc_lib_dir_glibc_arm)/elf_loader_arm.nexe', |
| 32 | ], |
| 33 | 'action': [ |
| 34 | 'python', '<(DEPTH)/build/cp.py', '>@(_inputs)', '>@(_outputs)' |
| 35 | ], |
| 36 | }], |
| 37 | }], |
| 38 | ], |
| 39 | }, |
| 40 | { |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 41 | 'target_name': 'ppapi_cpp_lib', |
| 42 | 'type': 'none', |
| 43 | 'variables': { |
| 44 | 'nlib_target': 'libppapi_cpp.a', |
[email protected] | ee82fab | 2012-09-24 22:14:34 | [diff] [blame] | 45 | 'nso_target': 'libppapi_cpp.so', |
thakis | cdde1a7 | 2015-09-15 01:57:26 | [diff] [blame] | 46 | 'nacl_untrusted_build': 1, |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 47 | 'build_glibc': 1, |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 48 | 'build_newlib': 1, |
[email protected] | f7c2871 | 2013-01-24 23:11:33 | [diff] [blame] | 49 | 'build_pnacl_newlib': 1, |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 50 | 'sources': [ |
[email protected] | 7091950 | 2011-12-16 02:30:03 | [diff] [blame] | 51 | '<@(cpp_source_files)', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 52 | 'cpp/module_embedder.h', |
| 53 | 'cpp/ppp_entrypoints.cc', |
| 54 | ], |
| 55 | }, |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 56 | }, |
| 57 | { |
[email protected] | ff92200c | 2012-09-10 21:58:16 | [diff] [blame] | 58 | 'target_name': 'ppapi_gles2_lib', |
| 59 | 'type': 'none', |
| 60 | 'variables': { |
| 61 | 'nlib_target': 'libppapi_gles2.a', |
thakis | cdde1a7 | 2015-09-15 01:57:26 | [diff] [blame] | 62 | 'nacl_untrusted_build': 1, |
[email protected] | ee82fab | 2012-09-24 22:14:34 | [diff] [blame] | 63 | 'nso_target': 'libppapi_gles2.so', |
[email protected] | ff92200c | 2012-09-10 21:58:16 | [diff] [blame] | 64 | 'build_glibc': 1, |
| 65 | 'build_newlib': 1, |
[email protected] | f7c2871 | 2013-01-24 23:11:33 | [diff] [blame] | 66 | 'build_pnacl_newlib': 1, |
[email protected] | ff92200c | 2012-09-10 21:58:16 | [diff] [blame] | 67 | 'include_dirs': [ |
| 68 | 'lib/gl/include', |
| 69 | ], |
| 70 | 'sources': [ |
| 71 | 'lib/gl/gles2/gl2ext_ppapi.c', |
| 72 | 'lib/gl/gles2/gl2ext_ppapi.h', |
| 73 | 'lib/gl/gles2/gles2.c', |
| 74 | ], |
| 75 | }, |
[email protected] | ff92200c | 2012-09-10 21:58:16 | [diff] [blame] | 76 | }, |
| 77 | { |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 78 | 'target_name': 'ppapi_nacl_tests', |
| 79 | 'type': 'none', |
| 80 | 'dependencies': [ |
[email protected] | ee82fab | 2012-09-24 22:14:34 | [diff] [blame] | 81 | '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib', |
ncbray | 731b352 | 2014-09-05 08:06:20 | [diff] [blame] | 82 | '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 83 | 'ppapi_cpp_lib', |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 84 | 'nacl_elf_loader', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 85 | 'native_client/native_client.gyp:ppapi_lib', |
[email protected] | 3b74078c | 2012-08-03 01:01:52 | [diff] [blame] | 86 | ], |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 87 | 'variables': { |
[email protected] | 03b3212 | 2013-04-05 07:19:47 | [diff] [blame] | 88 | # This is user code (vs IRT code), so tls accesses do not |
| 89 | # need to be indirect through a function call. |
| 90 | 'newlib_tls_flags=': [], |
[email protected] | 3b74078c | 2012-08-03 01:01:52 | [diff] [blame] | 91 | # TODO(bradnelson): Remove this compile flag once new nacl_rev is |
| 92 | # above 9362. |
| 93 | 'compile_flags': [ |
| 94 | '-DGL_GLEXT_PROTOTYPES', |
| 95 | ], |
[email protected] | a070d168 | 2013-03-27 07:40:56 | [diff] [blame] | 96 | # Speed up pnacl linking by not generating debug info for tests. |
| 97 | # We compile with --strip-all under extra_args so debug info is |
| 98 | # discarded anyway. Remove this and the --strip-all flag if |
| 99 | # debug info is really needed. |
[email protected] | 3c74cf48 | 2014-05-28 03:00:42 | [diff] [blame] | 100 | 'compile_flags!': [ |
[email protected] | a070d168 | 2013-03-27 07:40:56 | [diff] [blame] | 101 | '-g', |
| 102 | ], |
[email protected] | 3b74078c | 2012-08-03 01:01:52 | [diff] [blame] | 103 | 'defines': [ |
| 104 | 'GL_GLEXT_PROTOTYPES', |
| 105 | ], |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 106 | 'nexe_target': 'ppapi_nacl_tests', |
thakis | cdde1a7 | 2015-09-15 01:57:26 | [diff] [blame] | 107 | 'nacl_untrusted_build': 1, |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 108 | 'build_newlib': 1, |
| 109 | 'include_dirs': [ |
| 110 | 'lib/gl/include', |
| 111 | '..', |
| 112 | ], |
| 113 | 'link_flags': [ |
| 114 | '-lppapi_cpp', |
| 115 | '-lppapi', |
[email protected] | ad854a8ca | 2012-11-19 22:20:29 | [diff] [blame] | 116 | '-pthread', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 117 | ], |
[email protected] | a070d168 | 2013-03-27 07:40:56 | [diff] [blame] | 118 | 'link_flags!': [ |
| 119 | '-O3', |
| 120 | ], |
| 121 | 'translate_flags': [ |
| 122 | '-O0', |
| 123 | ], |
[email protected] | c5707ee | 2013-08-04 06:32:21 | [diff] [blame] | 124 | 'conditions': [ |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 125 | ['target_arch=="ia32"', { |
[email protected] | c5707ee | 2013-08-04 06:32:21 | [diff] [blame] | 126 | 'extra_deps_newlib32': [ |
| 127 | '>(tc_lib_dir_newlib32)/libppapi_cpp.a', |
| 128 | '>(tc_lib_dir_newlib32)/libppapi.a', |
| 129 | ], |
[email protected] | c5707ee | 2013-08-04 06:32:21 | [diff] [blame] | 130 | 'extra_deps_glibc32': [ |
| 131 | '>(tc_lib_dir_glibc32)/libppapi_cpp.so', |
| 132 | '>(tc_lib_dir_glibc32)/libppapi.so', |
| 133 | ], |
| 134 | }], |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 135 | ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 136 | 'extra_deps_newlib64': [ |
| 137 | '>(tc_lib_dir_newlib64)/libppapi_cpp.a', |
| 138 | '>(tc_lib_dir_newlib64)/libppapi.a', |
| 139 | ], |
| 140 | 'extra_deps_glibc64': [ |
| 141 | '>(tc_lib_dir_glibc64)/libppapi_cpp.so', |
| 142 | '>(tc_lib_dir_glibc64)/libppapi.so', |
| 143 | ], |
| 144 | }], |
[email protected] | c5707ee | 2013-08-04 06:32:21 | [diff] [blame] | 145 | ['target_arch=="arm"', { |
| 146 | 'extra_deps_arm': [ |
| 147 | '>(tc_lib_dir_newlib_arm)/libppapi_cpp.a', |
| 148 | '>(tc_lib_dir_newlib_arm)/libppapi.a', |
| 149 | ], |
| 150 | }], |
[email protected] | ebd08aa | 2012-05-22 19:54:38 | [diff] [blame] | 151 | ], |
[email protected] | c5707ee | 2013-08-04 06:32:21 | [diff] [blame] | 152 | 'extra_deps_pnacl_newlib': [ |
| 153 | '>(tc_lib_dir_pnacl_newlib)/libppapi_cpp.a', |
| 154 | '>(tc_lib_dir_pnacl_newlib)/libppapi.a', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 155 | ], |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 156 | 'sources': [ |
[email protected] | 7091950 | 2011-12-16 02:30:03 | [diff] [blame] | 157 | '<@(test_common_source_files)', |
| 158 | '<@(test_nacl_source_files)', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 159 | ], |
[email protected] | 8eca7f0 | 2013-01-26 06:06:31 | [diff] [blame] | 160 | 'extra_args': [ |
| 161 | '--strip-all', |
| 162 | ], |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 163 | 'variables': { |
| 164 | 'conditions': [ |
| 165 | ['target_arch=="arm"', { |
| 166 | 'objdump': '>(nacl_glibc_tc_root)/bin/arm-nacl-objdump' |
| 167 | }, { |
| 168 | 'objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump' |
| 169 | }], |
| 170 | ] |
| 171 | }, |
[email protected] | ea43be4 | 2013-12-17 01:33:39 | [diff] [blame] | 172 | 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 173 | 'create_nmf_flags': [ |
| 174 | '--no-default-libpath', |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 175 | '--objdump=<(objdump)', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 176 | ], |
[email protected] | 3c74cf48 | 2014-05-28 03:00:42 | [diff] [blame] | 177 | 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 178 | }, |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 179 | 'conditions': [ |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 180 | ['target_arch!="mipsel" and disable_glibc==0', { |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 181 | 'variables': { |
| 182 | 'build_glibc': 1, |
| 183 | # NOTE: Use /lib, not /lib64 here; it is a symbolic link which |
| 184 | # doesn't work on Windows. |
| 185 | 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', |
| 186 | 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 187 | 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', |
| 188 | }, |
| 189 | 'actions': [ |
| 190 | { |
| 191 | 'action_name': 'Generate GLIBC NMF and copy libs', |
[email protected] | ea43be4 | 2013-12-17 01:33:39 | [diff] [blame] | 192 | # NOTE: create_nmf must be first, it is the script python executes |
| 193 | # below. |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 194 | 'inputs': ['>(create_nmf)'], |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 195 | # NOTE: There is no explicit dependency for the lib32 |
| 196 | # and lib64 directories created in the PRODUCT_DIR. |
| 197 | # They are created as a side-effect of NMF creation. |
| 198 | 'outputs': ['>(nmf_glibc)'], |
| 199 | 'action': [ |
| 200 | 'python', |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 201 | '>@(_inputs)', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 202 | '>@(create_nmf_flags)', |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 203 | '--output=>(nmf_glibc)', |
| 204 | '--stage-dependencies=<(PRODUCT_DIR)', |
| 205 | ], |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 206 | 'conditions': [ |
| 207 | ['target_arch=="ia32"', { |
| 208 | 'action': [ |
| 209 | '--library-path=>(libdir_glibc32)', |
| 210 | '--library-path=>(tc_lib_dir_glibc32)', |
| 211 | ], |
| 212 | 'inputs': ['>(out_glibc32)'], |
| 213 | }], |
sbc | 4df2d47 | 2015-11-21 18:43:21 | [diff] [blame] | 214 | ['target_arch=="arm"', { |
| 215 | 'action': [ |
| 216 | '--library-path=>(nacl_glibc_tc_root)/arm-nacl/lib', |
| 217 | '--library-path=>(tc_lib_dir_glibc_arm)', |
| 218 | ], |
| 219 | 'inputs': ['>(out_glibc_arm)'], |
| 220 | }], |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 221 | ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 222 | 'action': [ |
| 223 | '--library-path=>(libdir_glibc64)', |
| 224 | '--library-path=>(tc_lib_dir_glibc64)', |
| 225 | ], |
| 226 | 'inputs': ['>(out_glibc64)'], |
| 227 | }], |
| 228 | ], |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 229 | }, |
| 230 | ], |
| 231 | }], |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 232 | # Test PNaCl pre-translated code (pre-translated to save bot time). |
| 233 | # We only care about testing that code generation is correct, |
| 234 | # and in-browser translation is tested elsewhere. |
| 235 | # NOTE: native_client/build/untrusted.gypi dictates that |
| 236 | # PNaCl only generate x86-32 and x86-64 on x86 platforms, |
[email protected] | 17d0f50c | 2014-04-07 17:51:04 | [diff] [blame] | 237 | # ARM on ARM platforms, or MIPS on MIPS platforms, not all |
| 238 | # versions always. |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 239 | # The same goes for the PNaCl shims. So, we have two variations here. |
[email protected] | a991263 | 2014-02-20 23:34:10 | [diff] [blame] | 240 | ['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="x64")', { |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 241 | 'variables': { |
| 242 | 'build_pnacl_newlib': 1, |
[email protected] | 4c94cae | 2014-07-29 03:03:12 | [diff] [blame] | 243 | 'translate_pexe_with_build': 1, |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 244 | 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 245 | }, |
| 246 | # Shim is a dependency for the nexe because we pre-translate. |
| 247 | 'dependencies': [ |
[email protected] | e2cda3251 | 2014-07-16 15:51:46 | [diff] [blame] | 248 | '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 249 | ], |
[email protected] | 2c8a509 | 2014-04-03 12:01:49 | [diff] [blame] | 250 | 'actions': [ |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 251 | { |
| 252 | 'action_name': 'Generate PNACL NEWLIB NMF', |
[email protected] | ea43be4 | 2013-12-17 01:33:39 | [diff] [blame] | 253 | # NOTE: create_nmf must be first, it is the script python executes |
| 254 | # below. |
| 255 | 'inputs': [ |
| 256 | '>(create_nmf)', |
[email protected] | ea43be4 | 2013-12-17 01:33:39 | [diff] [blame] | 257 | ], |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 258 | 'outputs': ['>(nmf_pnacl)'], |
| 259 | 'action': [ |
| 260 | 'python', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 261 | '>@(_inputs)', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 262 | '>@(create_nmf_flags)', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 263 | '--output=>(nmf_pnacl)', |
| 264 | ], |
bradnelson | 5c5b6414 | 2014-09-16 02:30:16 | [diff] [blame] | 265 | 'conditions': [ |
| 266 | ['target_arch=="ia32"', { |
| 267 | 'inputs': [ |
| 268 | '>(out_pnacl_newlib_x86_32_nexe)', |
| 269 | ], |
| 270 | }], |
| 271 | ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 272 | 'inputs': [ |
| 273 | '>(out_pnacl_newlib_x86_64_nexe)', |
| 274 | ], |
| 275 | }], |
| 276 | ], |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 277 | }, |
| 278 | ], |
| 279 | }], |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 280 | ['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="x64" or target_arch=="arm") and OS=="linux"', { |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 281 | # In addition to above configuration, build x86-32 and arm nonsfi |
| 282 | # .nexe files by translating from .pexe binary, for non-SFI mode PPAPI |
| 283 | # testing. |
[email protected] | 2c8a509 | 2014-04-03 12:01:49 | [diff] [blame] | 284 | 'variables': { |
[email protected] | 4c94cae | 2014-07-29 03:03:12 | [diff] [blame] | 285 | 'translate_pexe_with_build': 1, |
[email protected] | 3c74cf48 | 2014-05-28 03:00:42 | [diff] [blame] | 286 | 'nmf_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_nonsfi.nmf', |
[email protected] | 2c8a509 | 2014-04-03 12:01:49 | [diff] [blame] | 287 | }, |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 288 | 'conditions': [ |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 289 | ['target_arch=="ia32" or target_arch=="x64"', { |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 290 | 'variables': { |
| 291 | 'enable_x86_32_nonsfi': 1, |
| 292 | }, |
| 293 | }], |
| 294 | ['target_arch=="arm"', { |
| 295 | 'variables': { |
| 296 | 'enable_arm_nonsfi': 1, |
| 297 | }, |
| 298 | }], |
| 299 | ], |
[email protected] | 4c94cae | 2014-07-29 03:03:12 | [diff] [blame] | 300 | # Shim is a dependency for the nexe because we pre-translate. |
| 301 | 'dependencies': [ |
| 302 | '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', |
| 303 | ], |
[email protected] | 3c74cf48 | 2014-05-28 03:00:42 | [diff] [blame] | 304 | 'actions': [ |
| 305 | { |
| 306 | 'action_name': 'Generate PNACL NEWLIB NONSFI NMF', |
| 307 | 'inputs': ['>(create_nonsfi_test_nmf)'], |
| 308 | 'outputs': ['>(nmf_nonsfi)'], |
| 309 | 'action': [ |
| 310 | 'python', |
| 311 | '>(create_nonsfi_test_nmf)', |
| 312 | '--output=>(nmf_nonsfi)', |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 313 | ], |
| 314 | 'target_conditions': [ |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 315 | ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="ia32"', { |
| 316 | 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 317 | 'action': [ |
| 318 | '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', |
| 319 | '--arch=x86-32', |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 320 | ] |
| 321 | }], |
| 322 | ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="x64"', { |
| 323 | 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], |
| 324 | 'action': [ |
| 325 | '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', |
| 326 | # This should be used only for nacl_helper_nonsfi test. |
| 327 | # In theory this should be x86-32. However, currently |
| 328 | # fallback logic to x86-32-nonsfi is not implemented, |
| 329 | # and, moreover, it would break the tests for current |
| 330 | # nacl_helper in Non-SFI mode on x64 Chrome. |
| 331 | # So, here we introduce the hack to use "x86-64" in order |
| 332 | # to take the benefit to run nacl_helper_nonsfi tests on |
| 333 | # x64 Chrome. |
| 334 | # TODO(hidehiko): Remove this hack. |
| 335 | '--arch=x86-64', |
| 336 | ] |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 337 | }], |
| 338 | ['enable_arm_nonsfi==1', { |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 339 | 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 340 | 'action': [ |
| 341 | '--program=>(out_pnacl_newlib_arm_nonsfi_nexe)', |
| 342 | '--arch=arm', |
hidehiko | d342785 | 2015-02-02 15:26:05 | [diff] [blame] | 343 | ] |
mazda | e1b899f | 2014-11-13 07:19:31 | [diff] [blame] | 344 | }], |
[email protected] | 3c74cf48 | 2014-05-28 03:00:42 | [diff] [blame] | 345 | ], |
| 346 | }, |
| 347 | ], |
[email protected] | 2c8a509 | 2014-04-03 12:01:49 | [diff] [blame] | 348 | }], |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 349 | ['disable_pnacl==0 and target_arch=="arm"', { |
| 350 | 'variables': { |
| 351 | 'build_pnacl_newlib': 1, |
[email protected] | 4c94cae | 2014-07-29 03:03:12 | [diff] [blame] | 352 | 'translate_pexe_with_build': 1, |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 353 | 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 354 | }, |
| 355 | # Shim is a dependency for the nexe because we pre-translate. |
| 356 | 'dependencies': [ |
[email protected] | e2cda3251 | 2014-07-16 15:51:46 | [diff] [blame] | 357 | '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 358 | ], |
| 359 | 'actions': [ |
| 360 | { |
| 361 | 'action_name': 'Generate PNACL NEWLIB NMF', |
[email protected] | ea43be4 | 2013-12-17 01:33:39 | [diff] [blame] | 362 | # NOTE: create_nmf must be first, it is the script python executes |
| 363 | # below. |
| 364 | 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 365 | 'outputs': ['>(nmf_pnacl)'], |
| 366 | 'action': [ |
| 367 | 'python', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 368 | '>@(_inputs)', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 369 | '>@(create_nmf_flags)', |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 370 | '--output=>(nmf_pnacl)', |
| 371 | ], |
| 372 | }, |
| 373 | ], |
| 374 | }], |
[email protected] | 17d0f50c | 2014-04-07 17:51:04 | [diff] [blame] | 375 | ['disable_pnacl==0 and target_arch=="mipsel"', { |
| 376 | 'variables': { |
| 377 | 'build_pnacl_newlib': 1, |
[email protected] | 4c94cae | 2014-07-29 03:03:12 | [diff] [blame] | 378 | 'translate_pexe_with_build': 1, |
[email protected] | 17d0f50c | 2014-04-07 17:51:04 | [diff] [blame] | 379 | 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 380 | }, |
| 381 | # Shim is a dependency for the nexe because we pre-translate. |
| 382 | 'dependencies': [ |
[email protected] | e2cda3251 | 2014-07-16 15:51:46 | [diff] [blame] | 383 | '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', |
[email protected] | 17d0f50c | 2014-04-07 17:51:04 | [diff] [blame] | 384 | ], |
| 385 | 'actions': [ |
| 386 | { |
| 387 | 'action_name': 'Generate PNACL NEWLIB NMF', |
| 388 | 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], |
| 389 | 'outputs': ['>(nmf_pnacl)'], |
| 390 | 'action': [ |
| 391 | 'python', |
| 392 | '>@(_inputs)', |
sbc | d362de5 | 2015-04-16 20:56:27 | [diff] [blame] | 393 | '>@(create_nmf_flags)', |
[email protected] | 17d0f50c | 2014-04-07 17:51:04 | [diff] [blame] | 394 | '--output=>(nmf_pnacl)', |
| 395 | ], |
| 396 | }, |
| 397 | ], |
| 398 | }], |
[email protected] | 4223f8d | 2012-06-07 01:10:06 | [diff] [blame] | 399 | ], |
[email protected] | 1f081e7a | 2011-12-01 19:33:21 | [diff] [blame] | 400 | }, |
| 401 | ], |
| 402 | } |