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 'variables': { | 6 'variables': { |
7 'variables': { | 7 'variables': { |
8 # Enable -Werror by default, but put it in a variable so it can | 8 # Enable -Werror by default, but put it in a variable so it can |
9 # be optionally disabled. | 9 # be optionally disabled. |
10 'werror%': '-Werror', | 10 'werror%': '-Werror', |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 'include_dirs': ['<(DEPTH)'], | 123 'include_dirs': ['<(DEPTH)'], |
124 'defines': [ | 124 'defines': [ |
125 '<@(nacl_default_defines)', | 125 '<@(nacl_default_defines)', |
126 'NACL_BUILD_ARCH=x86', | 126 'NACL_BUILD_ARCH=x86', |
127 ], | 127 ], |
128 'sources': [], | 128 'sources': [], |
129 'link_flags': [], | 129 'link_flags': [], |
130 # X86-32 IRT needs to be callable with an under-aligned stack so we | 130 # X86-32 IRT needs to be callable with an under-aligned stack so we |
131 # disable SSE instructions, which can fault on misaligned addresses: | 131 # disable SSE instructions, which can fault on misaligned addresses: |
132 # see https://code.google.com/p/nativeclient/issues/detail?id=3935 | 132 # see https://code.google.com/p/nativeclient/issues/detail?id=3935 |
133 'irt_flags_x86_32': '-Wt,-mattr=-sse', | 133 'irt_flags_x86_32': '-mstackrealign -mno-sse', |
134 }, | 134 }, |
135 }, | 135 }, |
136 }], | 136 }], |
137 ['target_arch=="arm"', { | 137 ['target_arch=="arm"', { |
138 # Common defaults for all ARM nacl-gcc targets | 138 # Common defaults for all ARM nacl-gcc targets |
139 'target_defaults': { | 139 'target_defaults': { |
140 'defines': [], | 140 'defines': [], |
141 'sources': [], | 141 'sources': [], |
142 'compile_flags': [], | 142 'compile_flags': [], |
143 'link_flags': [], | 143 'link_flags': [], |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
326 }, | 326 }, |
327 'msvs_cygwin_shell': 0, | 327 'msvs_cygwin_shell': 0, |
328 'description': 'building >(out_newlib64)', | 328 'description': 'building >(out_newlib64)', |
329 'inputs': [ | 329 'inputs': [ |
330 '<@(common_inputs)', | 330 '<@(common_inputs)', |
331 '<(DEPTH)/native_client/build/link_irt.py', | 331 '<(DEPTH)/native_client/build/link_irt.py', |
332 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', | 332 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', |
333 '>@(extra_deps)', | 333 '>@(extra_deps)', |
334 '>@(extra_deps_newlib64)', | 334 '>@(extra_deps_newlib64)', |
335 '^(source_list_newlib64)', | 335 '^(source_list_newlib64)', |
336 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x 86_newlib/nacl_x86_newlib.json', | 336 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ newlib/pnacl_newlib.json', |
337 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', | 337 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
338 ], | 338 ], |
339 'outputs': ['>(out_newlib64)'], | 339 'outputs': ['>(out_newlib64)'], |
340 'action': [ | 340 'action': [ |
341 '<@(common_args)', | 341 '<@(common_args)', |
342 '>@(extra_args)', | 342 '>@(extra_args)', |
343 '--arch', 'x86-64', | 343 '--arch', 'x86-64', |
344 '--build', 'newlib_nexe_pnacl', | 344 '--build', 'newlib_nexe_clang', |
345 '--name', '>(out_newlib64)', | 345 '--name', '>(out_newlib64)', |
346 '--objdir', '>(objdir_newlib64)', | 346 '--objdir', '>(objdir_newlib64)', |
347 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', | 347 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', |
348 '--compile_flags=--target=x86_64-unknown-nacl ^(compile_flags ) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_f lags)', | 348 '--compile_flags=^(pnacl_compile_flags) >(_pnacl_compile_flag s) ^(native_irt_compile_flags) ^(clang_irt_compile_flags)', |
349 '--gomadir', '<(gomadir)', | 349 '--gomadir', '<(gomadir)', |
350 '--defines=^(defines) >(_defines)', | 350 '--defines=^(defines) >(_defines)', |
351 '--link_flags=--target=x86_64-unknown-nacl -arch x86-64 --pna cl-allow-translate --pnacl-allow-native -B>(tc_lib_dir_irt64) -L>(tc_lib_dir_irt 64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) >(libcpp_irt_stdlibs)', | 351 '--link_flags=-B>(tc_lib_dir_irt64) -L>(tc_lib_dir_irt64) ^( link_flags) >(_link_flags) ^(native_irt_link_flags) >(libcpp_irt_stdlibs)', |
352 '--source-list=^(source_list_newlib64)', | 352 '--source-list=^(source_list_newlib64)', |
353 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', | 353 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
354 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', | 354 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
355 ], | 355 ], |
356 }, | 356 }, |
357 ], | 357 ], |
358 }], | 358 }], |
359 # x86-64 IRT library action | 359 # x86-64 IRT library action |
360 ['nlib_target!="" and build_irt!=0 and enable_x86_64!=0', { | 360 ['nlib_target!="" and build_irt!=0 and enable_x86_64!=0', { |
361 'variables': { | 361 'variables': { |
362 'tool_name': 'irt', | 362 'tool_name': 'irt', |
363 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_ target_name)', | 363 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_ target_name)', |
364 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib 64/>(nlib_target)', | 364 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib 64/>(nlib_target)', |
365 }, | 365 }, |
366 'actions': [ | 366 'actions': [ |
367 { | 367 { |
368 'action_name': 'build irt x86-64 nlib', | 368 'action_name': 'build irt x86-64 nlib', |
369 'variables': { | 369 'variables': { |
370 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_na me).source_list.gypcmd ^(_sources) ^(sources))', | 370 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_na me).source_list.gypcmd ^(_sources) ^(sources))', |
371 }, | 371 }, |
372 'msvs_cygwin_shell': 0, | 372 'msvs_cygwin_shell': 0, |
373 'description': 'building >(out_newlib64)', | 373 'description': 'building >(out_newlib64)', |
374 'inputs': [ | 374 'inputs': [ |
375 '<@(common_inputs)', | 375 '<@(common_inputs)', |
376 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', | 376 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', |
377 '>@(extra_deps)', | 377 '>@(extra_deps)', |
378 '>@(extra_deps_newlib64)', | 378 '>@(extra_deps_newlib64)', |
379 '^(source_list_newlib64)', | 379 '^(source_list_newlib64)', |
380 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x 86_newlib/nacl_x86_newlib.json', | 380 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ newlib/pnacl_newlib.json', |
381 ], | 381 ], |
382 'outputs': ['>(out_newlib64)'], | 382 'outputs': ['>(out_newlib64)'], |
383 'action': [ | 383 'action': [ |
384 '<@(common_args)', | 384 '<@(common_args)', |
385 '>@(extra_args)', | 385 '>@(extra_args)', |
386 '--arch', 'x86-64', | 386 '--arch', 'x86-64', |
387 '--build', 'newlib_nlib_pnacl', | 387 '--build', 'newlib_nlib_clang', |
388 '--name', '>(out_newlib64)', | 388 '--name', '>(out_newlib64)', |
389 '--objdir', '>(objdir_newlib64)', | 389 '--objdir', '>(objdir_newlib64)', |
390 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', | 390 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', |
391 '--compile_flags=--target=x86_64-unknown-nacl ^(compile_flags ) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_f lags)', | 391 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_c ompile_flags) >(_pnacl_compile_flags) ^(native_irt_compile_flags) ^(clang_irt_co mpile_flags)', |
392 '--gomadir', '<(gomadir)', | 392 '--gomadir', '<(gomadir)', |
393 '--defines=^(defines) >(_defines)', | 393 '--defines=^(defines) >(_defines)', |
394 '--link_flags=--target=x86_64-unknown-nacl -B>(tc_lib_dir_irt 64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)', | 394 '--link_flags=-B>(tc_lib_dir_irt64) ^(link_flags) >(_link_fla gs) ^(native_irt_link_flags) >(libcpp_irt_stdlibs)', |
395 '--source-list=^(source_list_newlib64)', | 395 '--source-list=^(source_list_newlib64)', |
396 ], | 396 ], |
397 }, | 397 }, |
398 ], | 398 ], |
399 }], | 399 }], |
400 # x86-32 newlib nexe action | 400 # x86-32 newlib nexe action |
401 ['nexe_target!="" and build_newlib!=0 and enable_x86_32!=0', { | 401 ['nexe_target!="" and build_newlib!=0 and enable_x86_32!=0', { |
402 'variables': { | 402 'variables': { |
403 'tool_name': 'newlib', | 403 'tool_name': 'newlib', |
404 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe' , | 404 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe' , |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 }, | 494 }, |
495 'msvs_cygwin_shell': 0, | 495 'msvs_cygwin_shell': 0, |
496 'description': 'building >(out_newlib32)', | 496 'description': 'building >(out_newlib32)', |
497 'inputs': [ | 497 'inputs': [ |
498 '<@(common_inputs)', | 498 '<@(common_inputs)', |
499 '<(DEPTH)/native_client/build/link_irt.py', | 499 '<(DEPTH)/native_client/build/link_irt.py', |
500 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', | 500 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', |
501 '>@(extra_deps)', | 501 '>@(extra_deps)', |
502 '>@(extra_deps_newlib32)', | 502 '>@(extra_deps_newlib32)', |
503 '^(source_list_newlib32)', | 503 '^(source_list_newlib32)', |
504 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x 86_newlib/nacl_x86_newlib.json', | 504 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ newlib/pnacl_newlib.json', |
505 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', | 505 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
506 ], | 506 ], |
507 'outputs': ['>(out_newlib32)'], | 507 'outputs': ['>(out_newlib32)'], |
508 'action': [ | 508 'action': [ |
509 '<@(common_args)', | 509 '<@(common_args)', |
510 '>@(extra_args)', | 510 '>@(extra_args)', |
511 '--arch', 'x86-32', | 511 '--arch', 'x86-32', |
512 '--build', 'newlib_nexe_pnacl', | 512 '--build', 'newlib_nexe_clang', |
513 '--name', '>(out_newlib32)', | 513 '--name', '>(out_newlib32)', |
514 '--objdir', '>(objdir_newlib32)', | 514 '--objdir', '>(objdir_newlib32)', |
515 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', | 515 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', |
516 '--compile_flags=--target=i686-unknown-nacl ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_fla gs)', | 516 '--compile_flags=-m32 ^(compile_flags) >(_compile_flags) ^(pn acl_compile_flags) >(_pnacl_compile_flags) >(irt_flags_x86_32) ^(native_irt_comp ile_flags) ^(clang_irt_compile_flags)', |
517 '--gomadir', '<(gomadir)', | 517 '--gomadir', '<(gomadir)', |
518 '--defines=^(defines) >(_defines)', | 518 '--defines=^(defines) >(_defines)', |
519 '--link_flags=--target=i686-unknown-nacl -arch x86-32 --pnacl -allow-translate --pnacl-allow-native >(irt_flags_x86_32) -B>(tc_lib_dir_irt32) -L>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) >(lib cpp_irt_stdlibs)', | 519 '--link_flags=-m32 -B>(tc_lib_dir_irt32) -L>(tc_lib_dir_irt32 ) ^(link_flags) >(_link_flags) ^(native_irt_link_flags) >(libcpp_irt_stdlibs)', |
520 '--source-list=^(source_list_newlib32)', | 520 '--source-list=^(source_list_newlib32)', |
521 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', | 521 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
522 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', | 522 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
523 ], | 523 ], |
524 }, | 524 }, |
525 ], | 525 ], |
526 }], | 526 }], |
527 # x86-32 IRT library build | 527 # x86-32 IRT library build |
528 ['nlib_target!="" and build_irt!=0 and enable_x86_32!=0', { | 528 ['nlib_target!="" and build_irt!=0 and enable_x86_32!=0', { |
529 'variables': { | 529 'variables': { |
530 'tool_name': 'irt', | 530 'tool_name': 'irt', |
531 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib 32/>(nlib_target)', | 531 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib 32/>(nlib_target)', |
532 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_ target_name)', | 532 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_ target_name)', |
533 }, | 533 }, |
534 'actions': [ | 534 'actions': [ |
535 { | 535 { |
536 'action_name': 'build IRT x86-32 nlib', | 536 'action_name': 'build IRT x86-32 nlib', |
537 'variables': { | 537 'variables': { |
538 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_na me).source_list.gypcmd ^(_sources) ^(sources))', | 538 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_na me).source_list.gypcmd ^(_sources) ^(sources))', |
539 }, | 539 }, |
540 'msvs_cygwin_shell': 0, | 540 'msvs_cygwin_shell': 0, |
541 'description': 'building >(out_newlib32)', | 541 'description': 'building >(out_newlib32)', |
542 'inputs': [ | 542 'inputs': [ |
543 '<@(common_inputs)', | 543 '<@(common_inputs)', |
544 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', | 544 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inclu de_dirs) -S >(sources) >(_sources))', |
545 '>@(extra_deps)', | 545 '>@(extra_deps)', |
546 '>@(extra_deps_newlib32)', | 546 '>@(extra_deps_newlib32)', |
547 '^(source_list_newlib32)', | 547 '^(source_list_newlib32)', |
548 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x 86_newlib/nacl_x86_newlib.json', | 548 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ newlib/pnacl_newlib.json', |
549 ], | 549 ], |
550 'outputs': ['>(out_newlib32)'], | 550 'outputs': ['>(out_newlib32)'], |
551 'action': [ | 551 'action': [ |
552 '<@(common_args)', | 552 '<@(common_args)', |
553 '>@(extra_args)', | 553 '>@(extra_args)', |
554 '--arch', 'x86-32', | 554 '--arch', 'x86-32', |
555 '--build', 'newlib_nlib_pnacl', | 555 '--build', 'newlib_nlib_clang', |
556 '--name', '>(out_newlib32)', | 556 '--name', '>(out_newlib32)', |
557 '--objdir', '>(objdir_newlib32)', | 557 '--objdir', '>(objdir_newlib32)', |
558 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', | 558 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_i nclude_dirs)', |
559 '--compile_flags=--target=i686-unknown-nacl >(irt_flags_x86_3 2) ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', | 559 '--compile_flags=-m32 >(irt_flags_x86_32) ^(compile_flags) >( _compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags) ^(native_irt_comp ile_flags) ^(clang_irt_compile_flags)', |
560 '--gomadir', '<(gomadir)', | 560 '--gomadir', '<(gomadir)', |
561 '--defines=^(defines) >(_defines)', | 561 '--defines=^(defines) >(_defines)', |
562 '--link_flags=--target=i686-unknown-nacl -B>(tc_lib_dir_irt32 ) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)', | 562 '--link_flags=-m32 -B>(tc_lib_dir_irt32) ^(link_flags) >(_lin k_flags) ^(native_irt_link_flags) >(libcpp_irt_stdlibs)', |
563 '--source-list=^(source_list_newlib32)', | 563 '--source-list=^(source_list_newlib32)', |
564 ], | 564 ], |
565 }, | 565 }, |
566 ], | 566 ], |
567 }], | 567 }], |
568 ], | 568 ], |
569 }, | 569 }, |
570 }], # end x86 gcc nexe/nlib actions | 570 }], # end x86 gcc nexe/nlib actions |
571 ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', { | 571 ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', { |
572 'target_defaults': { | 572 'target_defaults': { |
(...skipping 13 matching lines...) Expand all Loading... | |
586 'stdlibs': ['-lc++', '-lm', '-lnacl', '-lc', '-lpnaclmm'], | 586 'stdlibs': ['-lc++', '-lm', '-lnacl', '-lc', '-lpnaclmm'], |
587 }, | 587 }, |
588 'msvs_cygwin_shell': 0, | 588 'msvs_cygwin_shell': 0, |
589 'description': 'building >(out_newlib32_nonsfi)', | 589 'description': 'building >(out_newlib32_nonsfi)', |
590 'inputs': [ | 590 'inputs': [ |
591 '<@(common_inputs)', | 591 '<@(common_inputs)', |
592 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include _dirs) -S >(sources) >(_sources))', | 592 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include _dirs) -S >(sources) >(_sources))', |
593 '>@(extra_deps)', | 593 '>@(extra_deps)', |
594 '>@(extra_deps_newlib32_nonsfi)', | 594 '>@(extra_deps_newlib32_nonsfi)', |
595 '^(source_list_newlib32_nonsfi)', | 595 '^(source_list_newlib32_nonsfi)', |
596 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x86 _newlib/nacl_x86_newlib.json', | 596 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ne wlib/pnacl_newlib.json', |
597 '>(tc_lib_dir_nonsfi_helper32)/libnacl_sys_private.a', | 597 '>(tc_lib_dir_nonsfi_helper32)/libnacl_sys_private.a', |
598 ], | 598 ], |
599 'outputs': ['>(out_newlib32_nonsfi)'], | 599 'outputs': ['>(out_newlib32_nonsfi)'], |
600 'action': [ | 600 'action': [ |
601 '<@(common_args)', | 601 '<@(common_args)', |
602 '>@(extra_args)', | 602 '>@(extra_args)', |
603 '--arch', 'x86-32-nonsfi', | 603 '--arch', 'x86-32-nonsfi', |
604 '--build', 'newlib_nexe_pnacl', | 604 '--build', 'newlib_nexe_pnacl', |
605 '--name', '>(out_newlib32_nonsfi)', | 605 '--name', '>(out_newlib32_nonsfi)', |
606 '--objdir', '>(objdir_newlib32_nonsfi)', | 606 '--objdir', '>(objdir_newlib32_nonsfi)', |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
644 'source_list_newlib32_nonsfi%': '^|(<(tool_name)-x86-32-nonsfi .>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', | 644 'source_list_newlib32_nonsfi%': '^|(<(tool_name)-x86-32-nonsfi .>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
645 }, | 645 }, |
646 'msvs_cygwin_shell': 0, | 646 'msvs_cygwin_shell': 0, |
647 'description': 'building >(out_newlib32_nonsfi)', | 647 'description': 'building >(out_newlib32_nonsfi)', |
648 'inputs': [ | 648 'inputs': [ |
649 '<@(common_inputs)', | 649 '<@(common_inputs)', |
650 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include _dirs) -S >(sources) >(_sources))', | 650 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include _dirs) -S >(sources) >(_sources))', |
651 '>@(extra_deps)', | 651 '>@(extra_deps)', |
652 '>@(extra_deps_newlib32_nonsfi)', | 652 '>@(extra_deps_newlib32_nonsfi)', |
653 '^(source_list_newlib32_nonsfi)', | 653 '^(source_list_newlib32_nonsfi)', |
654 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/nacl_x86 _newlib/nacl_x86_newlib.json', | 654 '<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_ne wlib/pnacl_newlib.json', |
655 ], | 655 ], |
656 'outputs': ['>(out_newlib32_nonsfi)'], | 656 'outputs': ['>(out_newlib32_nonsfi)'], |
657 'action': [ | 657 'action': [ |
658 '<@(common_args)', | 658 '<@(common_args)', |
659 '>@(extra_args)', | 659 '>@(extra_args)', |
660 '--arch', 'x86-32-nonsfi', | 660 '--arch', 'x86-32-nonsfi', |
661 '--build', 'newlib_nlib_pnacl', | 661 '--build', 'newlib_nlib_pnacl', |
662 '--name', '>(out_newlib32_nonsfi)', | 662 '--name', '>(out_newlib32_nonsfi)', |
663 '--objdir', '>(objdir_newlib32_nonsfi)', | 663 '--objdir', '>(objdir_newlib32_nonsfi)', |
664 '--include-dirs=>(tc_include_dir_newlib) <(DEPTH)/native_clien t/src/public/linux_syscalls ^(include_dirs) >(_include_dirs)', | 664 '--include-dirs=>(tc_include_dir_newlib) <(DEPTH)/native_clien t/src/public/linux_syscalls ^(include_dirs) >(_include_dirs)', |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
826 ], | 826 ], |
827 'outputs': ['>(out_newlib_arm)'], | 827 'outputs': ['>(out_newlib_arm)'], |
828 'action': [ | 828 'action': [ |
829 '<@(common_args)', | 829 '<@(common_args)', |
830 '>@(extra_args)', | 830 '>@(extra_args)', |
831 '--arch', 'arm', | 831 '--arch', 'arm', |
832 '--build', 'newlib_nexe', | 832 '--build', 'newlib_nexe', |
833 '--name', '>(out_newlib_arm)', | 833 '--name', '>(out_newlib_arm)', |
834 '--objdir', '>(objdir_newlib_arm)', | 834 '--objdir', '>(objdir_newlib_arm)', |
835 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)', | 835 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)', |
836 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_i rt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >( _compile_flags)', | 836 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(nativ e_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
837 '--gomadir', '<(gomadir)', | 837 '--gomadir', '<(gomadir)', |
838 '--defines=^(defines) >(_defines)', | 838 '--defines=^(defines) >(_defines)', |
839 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^( link_flags) >(_link_flags)', | 839 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(native_irt_link_flags) ^(link_flags) >(_link_flags)', |
840 '--source-list=^(source_list_newlib_arm)', | 840 '--source-list=^(source_list_newlib_arm)', |
841 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', | 841 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
842 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', | 842 '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
843 ], | 843 ], |
844 }, | 844 }, |
845 ], | 845 ], |
846 }], | 846 }], |
847 # arm IRT library action | 847 # arm IRT library action |
848 ['nlib_target!="" and build_irt!=0', { | 848 ['nlib_target!="" and build_irt!=0', { |
849 'variables': { | 849 'variables': { |
(...skipping 19 matching lines...) Expand all Loading... | |
869 ], | 869 ], |
870 'outputs': ['>(out_newlib_arm)'], | 870 'outputs': ['>(out_newlib_arm)'], |
871 'action': [ | 871 'action': [ |
872 '<@(common_args)', | 872 '<@(common_args)', |
873 '>@(extra_args)', | 873 '>@(extra_args)', |
874 '--arch', 'arm', | 874 '--arch', 'arm', |
875 '--build', 'newlib_nlib', | 875 '--build', 'newlib_nlib', |
876 '--name', '>(out_newlib_arm)', | 876 '--name', '>(out_newlib_arm)', |
877 '--objdir', '>(objdir_newlib_arm)', | 877 '--objdir', '>(objdir_newlib_arm)', |
878 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)', | 878 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)', |
879 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_i rt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >( _compile_flags)', | 879 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(nativ e_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
880 '--gomadir', '<(gomadir)', | 880 '--gomadir', '<(gomadir)', |
881 '--defines=^(defines) >(_defines)', | 881 '--defines=^(defines) >(_defines)', |
882 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^( link_flags) >(_link_flags)', | 882 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(native_irt_link_flags) ^(link_flags) >(_link_flags)', |
883 '--source-list=^(source_list_newlib_arm)', | 883 '--source-list=^(source_list_newlib_arm)', |
884 ], | 884 ], |
885 }, | 885 }, |
886 ], | 886 ], |
887 }], | 887 }], |
888 # ARM non-SFI helper nexe build. | 888 # ARM non-SFI helper nexe build. |
889 ['nexe_target!="" and build_nonsfi_helper!=0', { | 889 ['nexe_target!="" and build_nonsfi_helper!=0', { |
890 'variables': { | 890 'variables': { |
891 'tool_name': 'nonsfi_helper', | 891 'tool_name': 'nonsfi_helper', |
892 'out_newlib_arm_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_ar m_nonsfi.nexe', | 892 'out_newlib_arm_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_ar m_nonsfi.nexe', |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1446 ], | 1446 ], |
1447 'pnacl_compile_flags': [ | 1447 'pnacl_compile_flags': [ |
1448 '-Wno-extra-semi', | 1448 '-Wno-extra-semi', |
1449 '-Wno-unused-private-field', | 1449 '-Wno-unused-private-field', |
1450 '-Wno-char-subscripts', | 1450 '-Wno-char-subscripts', |
1451 '-Wno-unused-function', | 1451 '-Wno-unused-function', |
1452 '-std=gnu++11', | 1452 '-std=gnu++11', |
1453 ], | 1453 ], |
1454 # IRT compile/link flags to make the binary smaller. | 1454 # IRT compile/link flags to make the binary smaller. |
1455 # Omitted from non-IRT libraries to keep the libraries themselves small. | 1455 # Omitted from non-IRT libraries to keep the libraries themselves small. |
1456 'gcc_irt_compile_flags': [ | 1456 'native_irt_compile_flags': [ |
1457 '-ffunction-sections', | 1457 '-ffunction-sections', |
1458 '-fdata-sections', | 1458 '-fdata-sections', |
1459 ], | 1459 ], |
1460 'gcc_irt_link_flags': [ | 1460 'native_irt_link_flags': [ |
1461 '-Wl,--gc-sections', | 1461 '-Wl,--gc-sections', |
1462 ], | 1462 ], |
1463 # The IRT must be built using LLVM's assembler on x86-64 to preserve sandb ox | |
Mark Seaborn
2015/03/25 08:37:00
Nit: wrap to 80 chars
Derek Schuff
2015/03/25 18:04:20
Done.
| |
1464 # base address hiding (a security hardening mechanism). | |
1465 # It's also used on x86-32 for consistency. | |
1466 # See https://code.google.com/p/nativeclient/issues/detail?id=1235 | |
1467 # TODO(dschuff): merge this with native_irt_compile_flags when we use | |
1468 # nacl-clang for the IRT on all arches. | |
1469 'clang_irt_compile_flags': [ | |
1470 '-Os', | |
1471 '-integrated-as', | |
1472 '-fno-exceptions', | |
1473 ], | |
1463 'pnacl_irt_link_flags': [ | 1474 'pnacl_irt_link_flags': [ |
1464 '-Wt,-ffunction-sections', | 1475 '-Wt,-ffunction-sections', |
1465 '-Wt,-fdata-sections', | 1476 '-Wt,-fdata-sections', |
1466 '-Wn,--gc-sections', | 1477 '-Wn,--gc-sections', |
1467 ], | 1478 ], |
1468 # The clang driver automatically injects -lpthread when using libc++, but | 1479 # The clang driver automatically injects -lpthread when using libc++, but |
1469 # the toolchain doesn't have it yet. To get around this, use | 1480 # the toolchain doesn't have it yet. To get around this, use |
1470 # -nodefaultlibs and explicitly link irt_browser_lib to satisfy libc++'s | 1481 # -nodefaultlibs and explicitly link irt_browser_lib to satisfy libc++'s |
1471 # pthread dependency. | 1482 # pthread dependency. |
1472 'libcpp_irt_stdlibs': [ | 1483 'libcpp_irt_stdlibs': [ |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1885 ], | 1896 ], |
1886 }, | 1897 }, |
1887 ], | 1898 ], |
1888 }], | 1899 }], |
1889 ], | 1900 ], |
1890 }], # end MIPS | 1901 }], # end MIPS |
1891 # end pnacl actions for building ABI-biased native libraries | 1902 # end pnacl actions for building ABI-biased native libraries |
1892 ], # end conditions for pnacl biased nlib | 1903 ], # end conditions for pnacl biased nlib |
1893 }, | 1904 }, |
1894 } | 1905 } |
OLD | NEW |