From 6cb70ce82575d6f9e115cbab4bc6495ed61e3b22 Mon Sep 17 00:00:00 2001 From: Ales Pergl Date: Mon, 12 Jun 2017 10:58:26 +0200 Subject: [PATCH] Use dynamic CRT in the Windows static library build. Consequently, don't use the allocator shim. --- patches/build_gn.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/patches/build_gn.patch b/patches/build_gn.patch index 563850e0..94f61360 100644 --- a/patches/build_gn.patch +++ b/patches/build_gn.patch @@ -1,3 +1,15 @@ +diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn +index 8cdb06161f5c..285461d3381d 100644 +--- a/base/allocator/BUILD.gn ++++ b/base/allocator/BUILD.gn +@@ -16,6 +16,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 && ++ !is_electron_build && + !use_experimental_allocator_shim && !is_asan + + # This "allocator" meta-target will forward to the default allocator according diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index d055e70..c76ca27 100644 --- a/build/config/BUILDCONFIG.gn @@ -19,6 +31,19 @@ index d055e70..c76ca27 100644 ] if (is_win) { default_compiler_configs += [ +diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn +index 5e1f7fcc4d83..15723e6b7184 100644 +--- a/build/config/win/BUILD.gn ++++ b/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_component_build || is_electron_build) { + # Component mode: dynamic CRT. Since the library is shared, it requires + # exceptions or will give errors about things not matching, so keep + # exceptions on. diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn index 15bf689..9cdc19d 100644 --- a/third_party/WebKit/Source/platform/BUILD.gn