summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--third_party/BUILD.gn8
-rw-r--r--third_party/third_party.gyp14
2 files changed, 14 insertions, 8 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 933e92a2ac..92fbcaa9fb 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -179,7 +179,9 @@ source_set("fx_lcms2") {
# This is only used for standalone builds.
config("jpeg_warnings") {
visibility = [ ":*" ]
- cflags = [ "-Wno-shift-negative-value" ]
+ if (is_clang) {
+ cflags = [ "-Wno-shift-negative-value" ]
+ }
}
source_set("jpeg") {
@@ -364,7 +366,9 @@ if (pdf_enable_xfa) {
# TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712
config("fx_zlib_warnings") {
visibility = [ ":*" ]
- cflags = [ "-Wno-shift-negative-value" ]
+ if (is_clang) {
+ cflags = [ "-Wno-shift-negative-value" ]
+ }
}
source_set("fx_zlib") {
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index 0208fa14e3..6746230f1d 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -230,14 +230,12 @@
'libjpeg/jversion.h',
'libjpeg/transupp.h',
],
- 'cflags': [
- '-Wno-shift-negative-value',
- ],
'conditions': [
['os_posix==1', {
'cflags': [
'-Wno-main',
'-Wno-missing-braces',
+ '-Wno-shift-negative-value',
'-Wno-unused',
],
}],
@@ -316,9 +314,13 @@
'zlib_v128/uncompr.c',
'zlib_v128/zutil.c',
],
- 'cflags': [
- # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712
- '-Wno-shift-negative-value',
+ 'conditions': [
+ ['os_posix==1', {
+ 'cflags': [
+ # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712
+ '-Wno-shift-negative-value',
+ ],
+ }],
],
},