OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 # PLATFORM SELECTION | 6 # PLATFORM SELECTION |
7 # ============================================================================= | 7 # ============================================================================= |
8 # | 8 # |
9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name | 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name |
10 # of the GN thing that encodes combinations of these things. | 10 # of the GN thing that encodes combinations of these things. |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 if (is_win) { | 501 if (is_win) { |
502 # Many targets remove these configs, so they are not contained within | 502 # Many targets remove these configs, so they are not contained within |
503 # //build/config:executable_config for easy removal. | 503 # //build/config:executable_config for easy removal. |
504 _windows_linker_configs = [ | 504 _windows_linker_configs = [ |
505 "//build/config/win:default_incremental_linking", | 505 "//build/config/win:default_incremental_linking", |
506 | 506 |
507 # Default to console-mode apps. Most of our targets are tests and such | 507 # Default to console-mode apps. Most of our targets are tests and such |
508 # that shouldn't use the windows subsystem. | 508 # that shouldn't use the windows subsystem. |
509 "//build/config/win:console", | 509 "//build/config/win:console", |
510 ] | 510 ] |
| 511 } else if (is_mac) { |
| 512 _mac_linker_configs = [ "//build/config/mac:strip_all" ] |
511 } | 513 } |
512 | 514 |
513 # Executable defaults. | 515 # Executable defaults. |
514 _executable_configs = _native_compiler_configs + [ | 516 _executable_configs = _native_compiler_configs + [ |
515 "//build/config:default_libs", | 517 "//build/config:default_libs", |
516 "//build/config:executable_config", | 518 "//build/config:executable_config", |
517 ] | 519 ] |
518 if (is_win) { | 520 if (is_win) { |
519 _executable_configs += _windows_linker_configs | 521 _executable_configs += _windows_linker_configs |
| 522 } else if (is_mac) { |
| 523 _executable_configs += _mac_linker_configs |
520 } | 524 } |
521 set_defaults("executable") { | 525 set_defaults("executable") { |
522 configs = _executable_configs | 526 configs = _executable_configs |
523 } | 527 } |
524 | 528 |
525 # Static library defaults. | 529 # Static library defaults. |
526 set_defaults("static_library") { | 530 set_defaults("static_library") { |
527 configs = _native_compiler_configs | 531 configs = _native_compiler_configs |
528 } | 532 } |
529 | 533 |
530 # Shared library and loadable module defaults (also for components in component | 534 # Shared library and loadable module defaults (also for components in component |
531 # mode). | 535 # mode). |
532 _shared_library_configs = _native_compiler_configs + [ | 536 _shared_library_configs = _native_compiler_configs + [ |
533 "//build/config:default_libs", | 537 "//build/config:default_libs", |
534 "//build/config:shared_library_config", | 538 "//build/config:shared_library_config", |
535 ] | 539 ] |
536 if (is_win) { | 540 if (is_win) { |
537 _shared_library_configs += _windows_linker_configs | 541 _shared_library_configs += _windows_linker_configs |
538 } else if (is_android) { | 542 } else if (is_android) { |
539 # Strip native JNI exports from shared libraries by default. Binaries that | 543 # Strip native JNI exports from shared libraries by default. Binaries that |
540 # want this can remove this config. | 544 # want this can remove this config. |
541 _shared_library_configs += | 545 _shared_library_configs += |
542 [ "//build/config/android:hide_native_jni_exports" ] | 546 [ "//build/config/android:hide_native_jni_exports" ] |
| 547 } else if (is_mac) { |
| 548 _shared_library_configs += _mac_linker_configs |
543 } | 549 } |
544 set_defaults("shared_library") { | 550 set_defaults("shared_library") { |
545 configs = _shared_library_configs | 551 configs = _shared_library_configs |
546 } | 552 } |
547 set_defaults("loadable_module") { | 553 set_defaults("loadable_module") { |
548 configs = _shared_library_configs | 554 configs = _shared_library_configs |
549 } | 555 } |
550 if (is_component_build) { | 556 if (is_component_build) { |
551 set_defaults("component") { | 557 set_defaults("component") { |
552 configs = _shared_library_configs | 558 configs = _shared_library_configs |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 forward_variables_from(invoker, "*", [ "visibility" ]) | 626 forward_variables_from(invoker, "*", [ "visibility" ]) |
621 | 627 |
622 # All shared libraries must have the sanitizer deps to properly link in | 628 # All shared libraries must have the sanitizer deps to properly link in |
623 # asan mode (this target will be empty in other cases). | 629 # asan mode (this target will be empty in other cases). |
624 if (!defined(deps)) { | 630 if (!defined(deps)) { |
625 deps = [] | 631 deps = [] |
626 } | 632 } |
627 deps += [ "//build/config/sanitizers:deps" ] | 633 deps += [ "//build/config/sanitizers:deps" ] |
628 } | 634 } |
629 } | 635 } |
OLD | NEW |