| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 set_defaults("executable") { | 425 set_defaults("executable") { |
| 426 configs = _executable_configs | 426 configs = _executable_configs |
| 427 } | 427 } |
| 428 | 428 |
| 429 # Static library defaults. | 429 # Static library defaults. |
| 430 set_defaults("static_library") { | 430 set_defaults("static_library") { |
| 431 configs = _native_compiler_configs | 431 configs = _native_compiler_configs |
| 432 } | 432 } |
| 433 | 433 |
| 434 # Shared library defaults (also for components in component mode). | 434 # Shared library and loadable module defaults (also for components in component |
| 435 # mode). |
| 435 _shared_library_configs = | 436 _shared_library_configs = |
| 436 _native_compiler_configs + [ "//build/config:default_libs" ] | 437 _native_compiler_configs + [ "//build/config:default_libs" ] |
| 437 if (is_win) { | 438 if (is_win) { |
| 438 _shared_library_configs += _windows_linker_configs | 439 _shared_library_configs += _windows_linker_configs |
| 439 } else if (is_mac) { | 440 } else if (is_mac) { |
| 440 _shared_library_configs += [ "//build/config/mac:mac_dynamic_flags" ] | 441 _shared_library_configs += [ "//build/config/mac:mac_dynamic_flags" ] |
| 441 } else if (is_android) { | 442 } else if (is_android) { |
| 442 # Strip native JNI exports from shared libraries by default. Binaries that | 443 # Strip native JNI exports from shared libraries by default. Binaries that |
| 443 # want this can remove this config. | 444 # want this can remove this config. |
| 444 _shared_library_configs += | 445 _shared_library_configs += |
| 445 [ "//build/config/android:hide_native_jni_exports" ] | 446 [ "//build/config/android:hide_native_jni_exports" ] |
| 446 } | 447 } |
| 447 set_defaults("shared_library") { | 448 set_defaults("shared_library") { |
| 448 configs = _shared_library_configs | 449 configs = _shared_library_configs |
| 449 } | 450 } |
| 451 set_defaults("loadable_module") { |
| 452 configs = _shared_library_configs |
| 453 } |
| 450 if (is_component_build) { | 454 if (is_component_build) { |
| 451 set_defaults("component") { | 455 set_defaults("component") { |
| 452 configs = _shared_library_configs | 456 configs = _shared_library_configs |
| 453 } | 457 } |
| 454 } | 458 } |
| 455 | 459 |
| 456 # Source set defaults (also for components in non-component mode). | 460 # Source set defaults (also for components in non-component mode). |
| 457 set_defaults("source_set") { | 461 set_defaults("source_set") { |
| 458 configs = _native_compiler_configs | 462 configs = _native_compiler_configs |
| 459 } | 463 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 forward_variables_from(invoker, "*") | 563 forward_variables_from(invoker, "*") |
| 560 | 564 |
| 561 # All shared libraries must have the sanitizer deps to properly link in | 565 # All shared libraries must have the sanitizer deps to properly link in |
| 562 # asan mode (this target will be empty in other cases). | 566 # asan mode (this target will be empty in other cases). |
| 563 if (!defined(deps)) { | 567 if (!defined(deps)) { |
| 564 deps = [] | 568 deps = [] |
| 565 } | 569 } |
| 566 deps += [ "//build/config/sanitizers:deps" ] | 570 deps += [ "//build/config/sanitizers:deps" ] |
| 567 } | 571 } |
| 568 } | 572 } |
| OLD | NEW |