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

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

Issue 1488933002: Misc fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable C4267 for VC++ 2015 builds only Created 5 years 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 | google_apis/gcm/base/mcs_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 08d10a494fa019f7002074a59b999a1a7405d730..760657cedb34e6c8c0cf72bf16ea8e2254388c7f 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -753,6 +753,14 @@ config("default_warnings") {
"/wd4459",
]
+ if (visual_studio_version == "2015") {
+ # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to 4267.
+ # Example: short TruncTest(size_t x) { return x; }
+ # Since we already disable 4244 we need to disable 4267 during migration.
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ cflags += [ "/wd4267" ]
+ }
+
# VS xtree header file needs to be patched or 4702 (unreachable code
# warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is
# not patched.
« no previous file with comments | « no previous file | google_apis/gcm/base/mcs_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698