From 3f719e942b6a6593c4d2fab6895b30788b3dcf40 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 25 Jul 2018 09:14:43 -0700 Subject: [PATCH] build: [gn win] link against static crt in non-component builds (#610) Fixes link errors of the form: ``` node.lib(node_lib.Protocol.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in atom_main.obj ``` This is because in the GN build, node is linked statically instead of dynamically in non-component builds. --- patches/common/chromium/build_gn.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/common/chromium/build_gn.patch b/patches/common/chromium/build_gn.patch index 9c725d6c..7438e825 100644 --- a/patches/common/chromium/build_gn.patch +++ b/patches/common/chromium/build_gn.patch @@ -73,7 +73,7 @@ index 1f6bc13e087f..4630045ff554 100644 # what each value does. config("default_crt") { - if (is_component_build) { -+ if (is_component_build || is_electron_build) { ++ if (is_component_build || (is_electron_build && !is_electron_gn_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.