OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This GYP file defines untrusted (NaCl) targets. All targets in this | 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 | 6 # file should be conditionally depended upon via 'disable_nacl!=1' to avoid |
7 # requiring NaCl sources for building. | 7 # requiring NaCl sources for building. |
8 | 8 |
9 { | 9 { |
10 'includes': [ | 10 'includes': [ |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 '>(tc_lib_dir_pnacl_newlib)/libppapi.a', | 132 '>(tc_lib_dir_pnacl_newlib)/libppapi.a', |
133 ], | 133 ], |
134 'sources': [ | 134 'sources': [ |
135 '<@(test_common_source_files)', | 135 '<@(test_common_source_files)', |
136 '<@(test_nacl_source_files)', | 136 '<@(test_nacl_source_files)', |
137 ], | 137 ], |
138 'extra_args': [ | 138 'extra_args': [ |
139 '--strip-all', | 139 '--strip-all', |
140 ], | 140 ], |
141 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | 141 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', |
| 142 'create_nmf_flags': [ |
| 143 '--no-default-libpath', |
| 144 '--objdump=>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', |
| 145 ], |
142 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', | 146 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', |
143 }, | 147 }, |
144 'conditions': [ | 148 'conditions': [ |
145 ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { | 149 ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { |
146 'variables': { | 150 'variables': { |
147 'build_glibc': 1, | 151 'build_glibc': 1, |
148 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which | 152 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which |
149 # doesn't work on Windows. | 153 # doesn't work on Windows. |
150 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', | 154 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', |
151 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', | 155 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', |
152 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', | |
153 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', | 156 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', |
154 }, | 157 }, |
155 'actions': [ | 158 'actions': [ |
156 { | 159 { |
157 'action_name': 'Generate GLIBC NMF and copy libs', | 160 'action_name': 'Generate GLIBC NMF and copy libs', |
158 # NOTE: create_nmf must be first, it is the script python executes | 161 # NOTE: create_nmf must be first, it is the script python executes |
159 # below. | 162 # below. |
160 'inputs': ['>(create_nmf)'], | 163 'inputs': ['>(create_nmf)'], |
161 # NOTE: There is no explicit dependency for the lib32 | 164 # NOTE: There is no explicit dependency for the lib32 |
162 # and lib64 directories created in the PRODUCT_DIR. | 165 # and lib64 directories created in the PRODUCT_DIR. |
163 # They are created as a side-effect of NMF creation. | 166 # They are created as a side-effect of NMF creation. |
164 'outputs': ['>(nmf_glibc)'], | 167 'outputs': ['>(nmf_glibc)'], |
165 'action': [ | 168 'action': [ |
166 'python', | 169 'python', |
167 '>@(_inputs)', | 170 '>@(_inputs)', |
168 '--objdump=>(nacl_objdump)', | 171 '>@(create_nmf_flags)', |
169 '--output=>(nmf_glibc)', | 172 '--output=>(nmf_glibc)', |
170 '--stage-dependencies=<(PRODUCT_DIR)', | 173 '--stage-dependencies=<(PRODUCT_DIR)', |
171 ], | 174 ], |
172 'conditions': [ | 175 'conditions': [ |
173 ['target_arch=="ia32"', { | 176 ['target_arch=="ia32"', { |
174 'action': [ | 177 'action': [ |
175 '--library-path=>(libdir_glibc32)', | 178 '--library-path=>(libdir_glibc32)', |
176 '--library-path=>(tc_lib_dir_glibc32)', | 179 '--library-path=>(tc_lib_dir_glibc32)', |
177 ], | 180 ], |
178 'inputs': ['>(out_glibc32)'], | 181 'inputs': ['>(out_glibc32)'], |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 'action_name': 'Generate PNACL NEWLIB NMF', | 214 'action_name': 'Generate PNACL NEWLIB NMF', |
212 # NOTE: create_nmf must be first, it is the script python executes | 215 # NOTE: create_nmf must be first, it is the script python executes |
213 # below. | 216 # below. |
214 'inputs': [ | 217 'inputs': [ |
215 '>(create_nmf)', | 218 '>(create_nmf)', |
216 ], | 219 ], |
217 'outputs': ['>(nmf_pnacl)'], | 220 'outputs': ['>(nmf_pnacl)'], |
218 'action': [ | 221 'action': [ |
219 'python', | 222 'python', |
220 '>@(_inputs)', | 223 '>@(_inputs)', |
| 224 '>@(create_nmf_flags)', |
221 '--output=>(nmf_pnacl)', | 225 '--output=>(nmf_pnacl)', |
222 ], | 226 ], |
223 'conditions': [ | 227 'conditions': [ |
224 ['target_arch=="ia32"', { | 228 ['target_arch=="ia32"', { |
225 'inputs': [ | 229 'inputs': [ |
226 '>(out_pnacl_newlib_x86_32_nexe)', | 230 '>(out_pnacl_newlib_x86_32_nexe)', |
227 ], | 231 ], |
228 }], | 232 }], |
229 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { | 233 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
230 'inputs': [ | 234 'inputs': [ |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 'actions': [ | 321 'actions': [ |
318 { | 322 { |
319 'action_name': 'Generate PNACL NEWLIB NMF', | 323 'action_name': 'Generate PNACL NEWLIB NMF', |
320 # NOTE: create_nmf must be first, it is the script python executes | 324 # NOTE: create_nmf must be first, it is the script python executes |
321 # below. | 325 # below. |
322 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], | 326 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], |
323 'outputs': ['>(nmf_pnacl)'], | 327 'outputs': ['>(nmf_pnacl)'], |
324 'action': [ | 328 'action': [ |
325 'python', | 329 'python', |
326 '>@(_inputs)', | 330 '>@(_inputs)', |
| 331 '>@(create_nmf_flags)', |
327 '--output=>(nmf_pnacl)', | 332 '--output=>(nmf_pnacl)', |
328 ], | 333 ], |
329 }, | 334 }, |
330 ], | 335 ], |
331 }], | 336 }], |
332 ['disable_pnacl==0 and target_arch=="mipsel"', { | 337 ['disable_pnacl==0 and target_arch=="mipsel"', { |
333 'variables': { | 338 'variables': { |
334 'build_pnacl_newlib': 1, | 339 'build_pnacl_newlib': 1, |
335 'translate_pexe_with_build': 1, | 340 'translate_pexe_with_build': 1, |
336 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', | 341 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
337 }, | 342 }, |
338 # Shim is a dependency for the nexe because we pre-translate. | 343 # Shim is a dependency for the nexe because we pre-translate. |
339 'dependencies': [ | 344 'dependencies': [ |
340 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:aot', | 345 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:aot', |
341 ], | 346 ], |
342 'actions': [ | 347 'actions': [ |
343 { | 348 { |
344 'action_name': 'Generate PNACL NEWLIB NMF', | 349 'action_name': 'Generate PNACL NEWLIB NMF', |
345 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], | 350 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], |
346 'outputs': ['>(nmf_pnacl)'], | 351 'outputs': ['>(nmf_pnacl)'], |
347 'action': [ | 352 'action': [ |
348 'python', | 353 'python', |
349 '>@(_inputs)', | 354 '>@(_inputs)', |
| 355 '>@(create_nmf_flags)', |
350 '--output=>(nmf_pnacl)', | 356 '--output=>(nmf_pnacl)', |
351 ], | 357 ], |
352 }, | 358 }, |
353 ], | 359 ], |
354 }], | 360 }], |
355 ], | 361 ], |
356 }, | 362 }, |
357 ], | 363 ], |
358 } | 364 } |
OLD | NEW |