summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-01 15:18:56 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-03 16:01:30 +0200
commitcbdaa3d23be2601c043e685200b9551c07444863 (patch)
tree36c094a3117ec7acaa21fc2fb4c922f5e5ffc1b7
parent87ba4a11b2f22cb9e9877bbc87048c13c31d1721 (diff)
downloadqtwebengine-chromium-cbdaa3d23be2601c043e685200b9551c07444863.tar.gz
Add is_shared GN argument
Provide a way to tell GN the build is for a shared library even if it is not a component build. This is needed for Windows. Change-Id: If6f6a8eb3172eec1e425103c7435dc235753c73c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--chromium/base/allocator/BUILD.gn2
-rw-r--r--chromium/build/config/BUILDCONFIG.gn5
-rw-r--r--chromium/build/config/win/BUILD.gn2
3 files changed, 7 insertions, 2 deletions
diff --git a/chromium/base/allocator/BUILD.gn b/chromium/base/allocator/BUILD.gn
index 8cdb06161f5..bdb76c782cb 100644
--- a/chromium/base/allocator/BUILD.gn
+++ b/chromium/base/allocator/BUILD.gn
@@ -15,7 +15,7 @@ declare_args() {
# The Windows-only allocator shim is only enabled for Release static builds, and
# is mutually exclusive with the generalized shim.
-win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
+win_use_allocator_shim = is_win && !is_shared && !is_debug &&
!use_experimental_allocator_shim && !is_asan
# This "allocator" meta-target will forward to the default allocator according
diff --git a/chromium/build/config/BUILDCONFIG.gn b/chromium/build/config/BUILDCONFIG.gn
index d055e705627..4c2b3d5263a 100644
--- a/chromium/build/config/BUILDCONFIG.gn
+++ b/chromium/build/config/BUILDCONFIG.gn
@@ -164,6 +164,11 @@ declare_args() {
is_component_build = is_debug && current_os != "ios"
}
+declare_args() {
+ # Shared library build
+ is_shared = is_component_build
+}
+
assert(!(is_debug && is_official_build), "Can't do official debug builds")
# ==============================================================================
diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn
index 5e1f7fcc4d8..77ac2a7466a 100644
--- a/chromium/build/config/win/BUILD.gn
+++ b/chromium/build/config/win/BUILD.gn
@@ -276,7 +276,7 @@ config("common_linker_setup") {
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
# what each value does.
config("default_crt") {
- if (is_component_build) {
+ if (is_shared) {
# Component mode: dynamic CRT. Since the library is shared, it requires
# exceptions or will give errors about things not matching, so keep
# exceptions on.