Index: build/config/win/BUILD.gn |
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn |
index 3da27470120c5fe17c564f6f012dff4694cbc627..8885a70bf363b075056af2f88661769e5e069da7 100644 |
--- a/build/config/win/BUILD.gn |
+++ b/build/config/win/BUILD.gn |
@@ -102,7 +102,7 @@ config("compiler") { |
# skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK |
# we should explicitly add these flags in order to avoid unintended |
# consequences such as larger binaries. |
- ldflags = [ |
+ ldflags += [ |
brucedawson
2016/12/21 22:22:53
This is wrong. "+=" should only be allowed if ldfl
Wez
2016/12/22 00:03:08
Done.
|
"/OPT:REF", |
"/OPT:ICF", |
"/INCREMENTAL:NO", |
@@ -212,15 +212,18 @@ config("winver") { |
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs. |
config("sdk_link") { |
+ # Treat linker warnings as errors, to avoid spammy build output. |
+ ldflags = [ "/WX" ] |
+ |
if (current_cpu == "x64") { |
- ldflags = [ "/MACHINE:X64" ] |
+ ldflags += [ "/MACHINE:X64" ] |
lib_dirs = [ |
"$windows_sdk_path\Lib\winv6.3\um\x64", |
"$visual_studio_path\VC\lib\amd64", |
"$visual_studio_path\VC\atlmfc\lib\amd64", |
] |
} else { |
- ldflags = [ |
+ ldflags += [ |
"/MACHINE:X86", |
"/SAFESEH", # Not compatible with x64 so use only for x86. |
"/largeaddressaware", |
@@ -238,6 +241,7 @@ config("sdk_link") { |
# their own. |
config("common_linker_setup") { |
ldflags = [ |
+ "/WX", |
"/FIXED:NO", |
"/ignore:4199", |
"/ignore:4221", |