Index: build/config/win/BUILD.gn |
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn |
index bf1e613c92a74d5b744f0d90f8156d6fdcedd096..c514c31cc4f0f3d387b58a374182f46d1b83170b 100644 |
--- a/build/config/win/BUILD.gn |
+++ b/build/config/win/BUILD.gn |
@@ -141,6 +141,7 @@ config("vs_code_analysis") { |
# :runtime_library vs. :compiler. |
config("runtime_library") { |
cflags = [] |
+ libs = [] |
# Defines that set up the CRT. |
defines = [ |
@@ -168,6 +169,19 @@ config("runtime_library") { |
defines += [ "_USING_V110_SDK71_" ] |
} |
+ vcruntime_libs = [] |
+ if (is_debug) { |
+ vcruntime_libs += [ "vcruntimed.lib" ] |
+ if (visual_studio_version == "2015") { |
+ vcruntime_libs += [ "ucrtd.lib" ] |
+ } |
+ } else { |
+ vcruntime_libs += [ "vcruntime.lib" ] |
+ if (visual_studio_version == "2015") { |
+ vcruntime_libs += [ "ucrt.lib" ] |
+ } |
+ } |
+ |
if (is_component_build) { |
# Component mode: dynamic CRT. Since the library is shared, it requires |
# exceptions or will give errors about things not matching, so keep |
@@ -192,8 +206,10 @@ config("runtime_library") { |
} else { |
cflags += [ "/MT" ] |
} |
+ vcruntime_libs = [] |
} |
} |
+ libs += vcruntime_libs |
} |
# Sets the default Windows build version. This is separated because some |