Chromium Code Reviews| Index: build/config/BUILD.gn |
| diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn |
| index 643d4d9db4c6997e3c47ffb8091abdaa4e9a10b6..90516659603dedb5978157ee3070e8fb2c90a999 100644 |
| --- a/build/config/BUILD.gn |
| +++ b/build/config/BUILD.gn |
| @@ -4,6 +4,7 @@ |
| import("//build/config/allocator.gni") |
| import("//build/config/chrome_build.gni") |
| +import("//build/config/chromecast_build.gni") |
| import("//build/config/crypto.gni") |
| import("//build/config/features.gni") |
| import("//build/config/sanitizers/sanitizers.gni") |
| @@ -408,6 +409,61 @@ config("default_libs") { |
| } |
| } |
| +# Executable configs ----------------------------------------------------------- |
| + |
| +# Windows linker setup for EXEs and DLLs. |
| +if (is_win) { |
| + _windows_linker_configs = [ |
| + "//build/config/win:default_incremental_linking", |
| + "//build/config/win:sdk_link", |
| + "//build/config/win:common_linker_setup", |
| + |
| + # Default to console-mode apps. Most of our targets are tests and such |
| + # that shouldn't use the windows subsystem. |
| + "//build/config/win:console", |
|
brettw
2015/12/08 01:08:58
This won't work since targets need to override it
bcf
2015/12/08 02:22:26
Done.
|
| + ] |
| +} |
| + |
| +# This config defines the configs applied to all executables. |
| +config("executable_config") { |
| + configs = [] |
| + |
| + if (is_win) { |
| + configs += _windows_linker_configs |
| + } else if (is_mac) { |
| + configs += [ |
| + "//build/config/mac:mac_dynamic_flags", |
| + "//build/config/mac:mac_executable_flags", |
| + ] |
| + } else if (is_linux || is_android) { |
| + configs += [ "//build/config/gcc:executable_ldconfig" ] |
| + if (is_android) { |
| + configs += [ "//build/config/android:executable_config" ] |
| + } else if (is_chromecast) { |
| + configs += [ "//build/config/chromecast:executable_config" ] |
| + } |
| + } |
| +} |
| + |
| +# Shared library configs ------------------------------------------------------- |
| + |
| +# This config defines the configs applied to all shared libraries. |
| +config("shared_library_config") { |
| + configs = [] |
| + |
| + if (is_win) { |
| + configs += _windows_linker_configs |
| + } else if (is_mac) { |
| + configs += [ "//build/config/mac:mac_dynamic_flags" ] |
| + } else if (is_android) { |
| + # Strip native JNI exports from shared libraries by default. Binaries that |
| + # want this can remove this config. |
| + configs += [ "//build/config/android:hide_native_jni_exports" ] |
| + } else if (is_chromecast) { |
| + configs += [ "//build/config/chromecast:shared_library_config" ] |
| + } |
| +} |
| + |
| # Add this config to your target to enable precompiled headers. |
| # |
| # Precompiled headers are done on a per-target basis. If you have just a couple |