summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrucedawson <brucedawson@chromium.org>2016-01-06 15:08:33 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 23:09:33 +0000
commit9640699f0d7fc9cd4cb640557bd5459b71873192 (patch)
tree6ffbaa9f7bda9e0e0eebf95a6650a9bac42cf779
parent079aeefe2cdbb60ff4e53ce126d229aa850aaffa (diff)
downloadchromium_src-9640699f0d7fc9cd4cb640557bd5459b71873192.zip
chromium_src-9640699f0d7fc9cd4cb640557bd5459b71873192.tar.gz
chromium_src-9640699f0d7fc9cd4cb640557bd5459b71873192.tar.bz2
Copying gyp warning disables to gn for VS 2015 64-bit
gyp 64-bit builds with VS 2015, but gn 64-bit builds do not, because some warnings are disabled for gyp builds but not gn builds. This change makes the gn settings consistent enough to let gn 64-bit VS 2015 builds work. - build\config\compiler\BUILD.gn - disabling of C4312 copied from build\common.gypi - third_party/libxml/BUILD.gn and third_party/libxslt/BUILD.gn - disabling of C4267 and C4311 copied from libxml.gyp and libxslt.gyp files. Disabling of C4101 was *removed* from libxml\BUILD.gn for consistency and because it isn't needed anymore - third_party/mesa/BUILD.gn - disabling of C4311 copied from mesa.gyp R=scottmg@chromium.org BUG=440500 Review URL: https://codereview.chromium.org/1561913002 Cr-Commit-Position: refs/heads/master@{#367944}
-rw-r--r--build/config/compiler/BUILD.gn16
-rw-r--r--third_party/libxml/BUILD.gn3
-rw-r--r--third_party/libxslt/BUILD.gn8
-rw-r--r--third_party/libxslt/libxslt.gyp4
-rw-r--r--third_party/mesa/BUILD.gn1
5 files changed, 23 insertions, 9 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9f05d76..d52185a 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -750,11 +750,17 @@ config("default_warnings") {
]
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" ]
+ 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",
+ ]
}
# VS xtree header file needs to be patched or 4702 (unreachable code
diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn
index 5e633c0..70b66ab 100644
--- a/third_party/libxml/BUILD.gn
+++ b/third_party/libxml/BUILD.gn
@@ -28,7 +28,8 @@ config("libxml_warnings") {
if (is_win) {
cflags_c = [
"/wd4018", # Signed/unsigned mismatch in comparison.
- "/wd4101", # Unreferenced local variable.
+ "/wd4267", # TODO(brucedawson): http://crbug.com/554200 fix C4267
+ "/wd4311", # and C4311 warnings.
]
}
if (is_clang) {
diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn
index 3f27c5de5..6e8dcc9 100644
--- a/third_party/libxslt/BUILD.gn
+++ b/third_party/libxslt/BUILD.gn
@@ -86,7 +86,13 @@ static_library("libxslt") {
include_dirs = [ "linux" ]
} else if (is_win) {
include_dirs = [ "win32" ]
- cflags += [ "/wd4267" ] # size_t to int.
+ cflags += [
+ "/wd4267", # size_t to int.
+
+ # TODO(brucedawson): http://crbug.com/554200 4311 is a VS
+ # 2015 64-bit warning for pointer truncation
+ "/wd4311",
+ ]
} else if (is_mac) {
include_dirs = [ "mac" ]
}
diff --git a/third_party/libxslt/libxslt.gyp b/third_party/libxslt/libxslt.gyp
index 19ea0b1..fc6ffc4 100644
--- a/third_party/libxslt/libxslt.gyp
+++ b/third_party/libxslt/libxslt.gyp
@@ -109,8 +109,8 @@
'msvs_disabled_warnings': [
# size_t to int conversion.
4267,
- # TODO(brucedawson): http://crbug.com/554200 4311 is a VS
- # 2015 64-bit warning for pointer truncation
+ # TODO(brucedawson): http://crbug.com/554200 4311 is a
+ # VS 2015 64-bit warning for pointer truncation
4311,
],
'variables': {
diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn
index 6ae815d..a6fdb11 100644
--- a/third_party/mesa/BUILD.gn
+++ b/third_party/mesa/BUILD.gn
@@ -141,6 +141,7 @@ config("mesa_internal_warnings") {
"/wd4305", # Truncation from int to float.
"/wd4334", # Result of 32-bit shift implicitly converted to 64 bits.
"/wd4345", # POD-type default initializers.
+ "/wd4311", # Pointer truncation TODO(brucedawson): http://crbug.com/554200
]
}
}