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

Unified Diff: build/config/compiler/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/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 96d012d0e7d2717794341ca97d13265f249aa148..a9b377ed4df2b0eeafb178d6e0d2fbe3ce7f5da2 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -17,6 +17,9 @@ if (current_cpu == "arm" || current_cpu == "arm64") {
if (current_cpu == "mipsel" || current_cpu == "mips64el") {
import("//build/config/mips.gni")
}
+if (is_win) {
+ import("//build/config/win/visual_studio_version.gni")
+}
if (is_mac) {
import("//build/config/mac/symbols.gni")
}
@@ -909,20 +912,22 @@ config("default_warnings") {
"/wd4459",
]
- cflags += [
- # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
- # TODO(brucedawson): fix warnings, crbug.com/554200
- "/wd4312",
- ]
-
- if (current_cpu == "x86") {
+ if (visual_studio_version == "2015") {
cflags += [
- # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
- # 4267. Example: short TruncTest(size_t x) { return x; }
- # Since we disable 4244 we need to disable 4267 during migration.
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- "/wd4267",
+ # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
+ # TODO(brucedawson): fix warnings, crbug.com/554200
+ "/wd4312",
]
Michael Achenbach 2016/11/29 09:21:10 Needed to merge non-trivially here...
+
+ if (current_cpu == "x86") {
+ cflags += [
+ # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
+ # 4267. Example: short TruncTest(size_t x) { return x; }
+ # Since we disable 4244 we need to disable 4267 during migration.
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "/wd4267",
+ ]
+ }
}
# VS xtree header file needs to be patched or 4702 (unreachable code
@@ -935,6 +940,7 @@ config("default_warnings") {
# 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 += [
# TODO(hans): Make this list shorter eventually, http://crbug.com/504657
@@ -1544,7 +1550,7 @@ config("symbols") {
import("//build/toolchain/goma.gni")
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
- if (is_win_fastlink) {
+ if (is_win_fastlink && visual_studio_version != "2013") {
# Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying
# it all. This flag is incompatible with /PROFILE

Powered by Google App Engine
This is Rietveld 408576698