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

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

Issue 2531333004: Revert of win: Remove unneeded references to visual_studio_version now that it's always 2015. (Closed)
Patch Set: Comment + rebase Created 4 years, 1 month 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
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 3da27470120c5fe17c564f6f012dff4694cbc627..52ae78f9c5a9df981169da220ea41426f7934d8d 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -48,24 +48,36 @@ config("compiler") {
cflags_c = [ "/TC" ]
cflags_cc = [ "/TP" ]
- cflags += [
- # Tell the compiler to crash on failures. This is undocumented
- # and unsupported but very handy.
- "/d2FastFail",
-
- # Work around crbug.com/526851, bug in VS 2015 RTM compiler.
- "/Zc:sizedDealloc-",
-
- # Disable thread-safe statics to avoid overhead and because
- # they are disabled on other platforms. See crbug.com/587210
- # and -fno-threadsafe-statics.
- "/Zc:threadSafeInit-",
- ]
+ # Flags not supported in version 2013.
+ 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.
+ "/Zc:sizedDealloc-",
+
+ # Disable thread-safe statics to avoid overhead and because
+ # they are disabled on other platforms. See crbug.com/587210
+ # and -fno-threadsafe-statics.
+ "/Zc:threadSafeInit-",
+ ]
+ }
# Building with Clang on Windows is a work in progress and very
# experimental. See crbug.com/82385.
+ # Keep this in sync with the similar block in build/common.gypi
if (is_clang) {
- cflags += [ "-fmsc-version=1900" ]
+ if (visual_studio_version == "2013") {
+ cflags += [ "-fmsc-version=1800" ]
+ } else if (visual_studio_version == "2015") {
+ cflags += [ "-fmsc-version=1900" ]
+ }
if (current_cpu == "x86") {
cflags += [ "-m32" ]

Powered by Google App Engine
This is Rietveld 408576698