Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: build/config/win/BUILD.gn

Issue 2166253002: gn: Guard windows compiler flag with the supporting msvs version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 852a86230f44b4c7f26b5e403f9d04667b4c62fd..90be9952c799d796c16958800bcd5362b2d0a9e5 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -37,10 +37,6 @@ config("compiler") {
"/Gy", # Enable function-level linking.
"/FS", # Preserve previous PDB behavior.
"/bigobj", # Some of our files are bigger than the regular limits.
-
- # Tell the compiler to crash on failures. This is undocumented
- # and unsupported but very handy.
- "/d2FastFail",
]
# Force C/C++ mode for the given GN detected file type. This is necessary
@@ -49,6 +45,15 @@ config("compiler") {
cflags_c = [ "/TC" ]
cflags_cc = [ "/TP" ]
+ # Flags not supported in version 2013.
Michael Achenbach 2016/07/21 09:03:19 We could also add this to the 2015 case below, but
+ if (visual_studio_version != "2013" && visual_studio_version != "2013e") {
+ cflags += [
+ # Tell the compiler to crash on failures. This is undocumented
+ # and unsupported but very handy.
+ "/d2FastFail",
+ ]
+ }
+
if (visual_studio_version == "2015") {
cflags += [
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
@@ -260,11 +265,16 @@ config("common_linker_setup") {
# which started happening more regularly after VS2013 Update 4.
# Needs to be a bit lower for VS2015, or else errors out.
"/maxilksize:0x7ff00000",
-
- # Tell the linker to crash on failures.
- "/fastfail",
]
+ # Flags not supported in version 2013.
+ if (visual_studio_version != "2013" && visual_studio_version != "2013e") {
+ ldflags += [
+ # Tell the linker to crash on failures.
+ "/fastfail",
+ ]
+ }
+
# ASLR makes debugging with windbg difficult because Chrome.exe and
# Chrome.dll share the same base name. As result, windbg will name the
# Chrome.dll module like chrome_<base address>, where <base address>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698