OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 { | 5 { |
6 'target_defaults': { | 6 'target_defaults': { |
7 'variables': { | 7 'variables': { |
8 'nacl_target': 0, | 8 'nacl_target': 0, |
9 }, | 9 }, |
10 'target_conditions': [ | 10 'target_conditions': [ |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 'inputs': [ | 128 'inputs': [ |
129 '<!@(<(irt_inputs_cmd) --platform=x86-64)', | 129 '<!@(<(irt_inputs_cmd) --platform=x86-64)', |
130 ], | 130 ], |
131 'outputs': ['<(PRODUCT_DIR)/nacl_irt_x86_64.nexe'], | 131 'outputs': ['<(PRODUCT_DIR)/nacl_irt_x86_64.nexe'], |
132 'action': [ | 132 'action': [ |
133 '<@(irt_build_cmd)', '--platform', 'x86-64', | 133 '<@(irt_build_cmd)', '--platform', 'x86-64', |
134 ], | 134 ], |
135 }, | 135 }, |
136 ], | 136 ], |
137 }], | 137 }], |
138 ['OS!="win" and target_arch=="arm"', { | |
noelallen_use_chromium
2011/10/21 00:16:51
Inconsistent check here. You check for win, but i
jasonwkim
2011/10/21 20:16:56
I am just following the established pattern. First
| |
139 'actions': [ | |
140 { | |
141 'action_name': 'nacl_irt', | |
142 'message': 'Building NaCl IRT', | |
143 'inputs': [ | |
144 '<!@(<(irt_inputs_cmd) --platform=arm)', | |
145 ], | |
146 'outputs': ['<(PRODUCT_DIR)/nacl_ir.nexe'], | |
147 'action': [ | |
148 '<@(irt_build_cmd)', '--platform', 'arm', | |
149 ], | |
150 }, | |
151 ], | |
152 }], | |
138 ], | 153 ], |
139 }, | 154 }, |
140 ], | 155 ], |
141 'conditions': [ | 156 'conditions': [ |
142 ['OS=="win"', { | 157 ['OS=="win"', { |
143 'targets': [ | 158 'targets': [ |
144 { | 159 { |
145 'target_name': 'nacl_win64', | 160 'target_name': 'nacl_win64', |
146 'type': 'static_library', | 161 'type': 'static_library', |
147 'variables': { | 162 'variables': { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 '../tools/ld_bfd/ld', | 320 '../tools/ld_bfd/ld', |
306 ], | 321 ], |
307 'outputs': [ | 322 'outputs': [ |
308 '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw', | 323 '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw', |
309 ], | 324 ], |
310 'message': 'Linking nacl_helper_bootstrap_raw', | 325 'message': 'Linking nacl_helper_bootstrap_raw', |
311 'conditions': [ | 326 'conditions': [ |
312 ['target_arch=="x64"', { | 327 ['target_arch=="x64"', { |
313 'variables': { | 328 'variables': { |
314 'linker_emulation': 'elf_x86_64', | 329 'linker_emulation': 'elf_x86_64', |
330 'bootstrap_extra_lib': '', | |
315 } | 331 } |
316 }], | 332 }], |
317 ['target_arch=="ia32"', { | 333 ['target_arch=="ia32"', { |
318 'variables': { | 334 'variables': { |
319 'linker_emulation': 'elf_i386', | 335 'linker_emulation': 'elf_i386', |
336 'bootstrap_extra_lib': '', | |
320 } | 337 } |
321 }], | 338 }], |
322 ['target_arch=="arm"', { | 339 ['target_arch=="arm"', { |
323 'variables': { | 340 'variables': { |
324 'linker_emulation': 'armelf_linux_eabi', | 341 'linker_emulation': 'armelf_linux_eabi', |
342 # ARM requires linking against libc due to ABI dependenc ies on | |
343 # memset | |
344 'bootstrap_extra_lib' : "${SYSROOT}/usr/lib/libc.a", | |
325 } | 345 } |
326 }], | 346 }], |
327 ], | 347 ], |
328 'action': ['../tools/ld_bfd/ld', | 348 'action': ['../tools/ld_bfd/ld', |
329 '-m', '<(linker_emulation)', | 349 '-m', '<(linker_emulation)', |
330 '--build-id', | 350 '--build-id', |
331 # This program is (almost) entirely standalone. It | 351 # This program is (almost) entirely standalone. It |
332 # has its own startup code, so no crt1.o for it. I t is | 352 # has its own startup code, so no crt1.o for it. I t is |
333 # statically linked, and on x86 it does not use | 353 # statically linked, and on x86 it does not use |
334 # libc at all. However, on ARM it needs a few (saf e) | 354 # libc at all. However, on ARM it needs a few (saf e) |
335 # things from libc. | 355 # things from libc. |
336 '-static', | 356 '-static', |
337 # Link with custom linker script for special layout . | 357 # Link with custom linker script for special layout . |
338 '--script=<(linker_script)', | 358 '--script=<(linker_script)', |
339 '-o', '<@(_outputs)', | 359 '-o', '<@(_outputs)', |
340 # On x86-64, the default page size with some | 360 # On x86-64, the default page size with some |
341 # linkers is 2M rather than the real Linux page | 361 # linkers is 2M rather than the real Linux page |
342 # size of 4K. A larger page size is incompatible | 362 # size of 4K. A larger page size is incompatible |
343 # with our custom linker script's special layout. | 363 # with our custom linker script's special layout. |
344 '-z', 'max-page-size=0x1000', | 364 '-z', 'max-page-size=0x1000', |
345 '--whole-archive', '<(bootstrap_lib)', | 365 '--whole-archive', '<(bootstrap_lib)', |
346 '--no-whole-archive', | 366 '--no-whole-archive', |
367 '<(bootstrap_extra_lib)', | |
347 ], | 368 ], |
348 } | 369 } |
349 ], | 370 ], |
350 }, | 371 }, |
351 { | 372 { |
352 'target_name': 'nacl_helper_bootstrap', | 373 'target_name': 'nacl_helper_bootstrap', |
353 'dependencies': [ | 374 'dependencies': [ |
354 'nacl_helper_bootstrap_raw', | 375 'nacl_helper_bootstrap_raw', |
355 'nacl_helper_bootstrap_munge_phdr#host', | 376 'nacl_helper_bootstrap_munge_phdr#host', |
356 ], | 377 ], |
(...skipping 26 matching lines...) Expand all Loading... | |
383 'target_name': 'nacl_win64', | 404 'target_name': 'nacl_win64', |
384 'type': 'none', | 405 'type': 'none', |
385 'sources': [], | 406 'sources': [], |
386 }, | 407 }, |
387 ], | 408 ], |
388 }], | 409 }], |
389 ], | 410 ], |
390 }], | 411 }], |
391 ], | 412 ], |
392 } | 413 } |
OLD | NEW |