| 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 ], | |
| 146 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', | 142 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', |
| 147 }, | 143 }, |
| 148 'conditions': [ | 144 'conditions': [ |
| 149 ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { | 145 ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { |
| 150 'variables': { | 146 'variables': { |
| 151 'build_glibc': 1, | 147 'build_glibc': 1, |
| 152 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which | 148 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which |
| 153 # doesn't work on Windows. | 149 # doesn't work on Windows. |
| 154 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', | 150 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', |
| 155 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', | 151 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', |
| 152 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', |
| 156 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', | 153 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', |
| 157 }, | 154 }, |
| 158 'actions': [ | 155 'actions': [ |
| 159 { | 156 { |
| 160 'action_name': 'Generate GLIBC NMF and copy libs', | 157 'action_name': 'Generate GLIBC NMF and copy libs', |
| 161 # NOTE: create_nmf must be first, it is the script python executes | 158 # NOTE: create_nmf must be first, it is the script python executes |
| 162 # below. | 159 # below. |
| 163 'inputs': ['>(create_nmf)'], | 160 'inputs': ['>(create_nmf)'], |
| 164 # NOTE: There is no explicit dependency for the lib32 | 161 # NOTE: There is no explicit dependency for the lib32 |
| 165 # and lib64 directories created in the PRODUCT_DIR. | 162 # and lib64 directories created in the PRODUCT_DIR. |
| 166 # They are created as a side-effect of NMF creation. | 163 # They are created as a side-effect of NMF creation. |
| 167 'outputs': ['>(nmf_glibc)'], | 164 'outputs': ['>(nmf_glibc)'], |
| 168 'action': [ | 165 'action': [ |
| 169 'python', | 166 'python', |
| 170 '>@(_inputs)', | 167 '>@(_inputs)', |
| 171 '>@(create_nmf_flags)', | 168 '--objdump=>(nacl_objdump)', |
| 172 '--output=>(nmf_glibc)', | 169 '--output=>(nmf_glibc)', |
| 173 '--stage-dependencies=<(PRODUCT_DIR)', | 170 '--stage-dependencies=<(PRODUCT_DIR)', |
| 174 ], | 171 ], |
| 175 'conditions': [ | 172 'conditions': [ |
| 176 ['target_arch=="ia32"', { | 173 ['target_arch=="ia32"', { |
| 177 'action': [ | 174 'action': [ |
| 178 '--library-path=>(libdir_glibc32)', | 175 '--library-path=>(libdir_glibc32)', |
| 179 '--library-path=>(tc_lib_dir_glibc32)', | 176 '--library-path=>(tc_lib_dir_glibc32)', |
| 180 ], | 177 ], |
| 181 'inputs': ['>(out_glibc32)'], | 178 'inputs': ['>(out_glibc32)'], |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 'action_name': 'Generate PNACL NEWLIB NMF', | 211 'action_name': 'Generate PNACL NEWLIB NMF', |
| 215 # NOTE: create_nmf must be first, it is the script python executes | 212 # NOTE: create_nmf must be first, it is the script python executes |
| 216 # below. | 213 # below. |
| 217 'inputs': [ | 214 'inputs': [ |
| 218 '>(create_nmf)', | 215 '>(create_nmf)', |
| 219 ], | 216 ], |
| 220 'outputs': ['>(nmf_pnacl)'], | 217 'outputs': ['>(nmf_pnacl)'], |
| 221 'action': [ | 218 'action': [ |
| 222 'python', | 219 'python', |
| 223 '>@(_inputs)', | 220 '>@(_inputs)', |
| 224 '>@(create_nmf_flags)', | |
| 225 '--output=>(nmf_pnacl)', | 221 '--output=>(nmf_pnacl)', |
| 226 ], | 222 ], |
| 227 'conditions': [ | 223 'conditions': [ |
| 228 ['target_arch=="ia32"', { | 224 ['target_arch=="ia32"', { |
| 229 'inputs': [ | 225 'inputs': [ |
| 230 '>(out_pnacl_newlib_x86_32_nexe)', | 226 '>(out_pnacl_newlib_x86_32_nexe)', |
| 231 ], | 227 ], |
| 232 }], | 228 }], |
| 233 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { | 229 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 234 'inputs': [ | 230 'inputs': [ |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 'actions': [ | 299 'actions': [ |
| 304 { | 300 { |
| 305 'action_name': 'Generate PNACL NEWLIB NMF', | 301 'action_name': 'Generate PNACL NEWLIB NMF', |
| 306 # NOTE: create_nmf must be first, it is the script python executes | 302 # NOTE: create_nmf must be first, it is the script python executes |
| 307 # below. | 303 # below. |
| 308 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], | 304 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], |
| 309 'outputs': ['>(nmf_pnacl)'], | 305 'outputs': ['>(nmf_pnacl)'], |
| 310 'action': [ | 306 'action': [ |
| 311 'python', | 307 'python', |
| 312 '>@(_inputs)', | 308 '>@(_inputs)', |
| 313 '>@(create_nmf_flags)', | |
| 314 '--output=>(nmf_pnacl)', | 309 '--output=>(nmf_pnacl)', |
| 315 ], | 310 ], |
| 316 }, | 311 }, |
| 317 ], | 312 ], |
| 318 }], | 313 }], |
| 319 ['disable_pnacl==0 and target_arch=="mipsel"', { | 314 ['disable_pnacl==0 and target_arch=="mipsel"', { |
| 320 'variables': { | 315 'variables': { |
| 321 'build_pnacl_newlib': 1, | 316 'build_pnacl_newlib': 1, |
| 322 'translate_pexe_with_build': 1, | 317 'translate_pexe_with_build': 1, |
| 323 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', | 318 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 324 }, | 319 }, |
| 325 # Shim is a dependency for the nexe because we pre-translate. | 320 # Shim is a dependency for the nexe because we pre-translate. |
| 326 'dependencies': [ | 321 'dependencies': [ |
| 327 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:aot', | 322 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:aot', |
| 328 ], | 323 ], |
| 329 'actions': [ | 324 'actions': [ |
| 330 { | 325 { |
| 331 'action_name': 'Generate PNACL NEWLIB NMF', | 326 'action_name': 'Generate PNACL NEWLIB NMF', |
| 332 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], | 327 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], |
| 333 'outputs': ['>(nmf_pnacl)'], | 328 'outputs': ['>(nmf_pnacl)'], |
| 334 'action': [ | 329 'action': [ |
| 335 'python', | 330 'python', |
| 336 '>@(_inputs)', | 331 '>@(_inputs)', |
| 337 '>@(create_nmf_flags)', | |
| 338 '--output=>(nmf_pnacl)', | 332 '--output=>(nmf_pnacl)', |
| 339 ], | 333 ], |
| 340 }, | 334 }, |
| 341 ], | 335 ], |
| 342 }], | 336 }], |
| 343 ], | 337 ], |
| 344 }, | 338 }, |
| 345 ], | 339 ], |
| 346 } | 340 } |
| OLD | NEW |