diff options
author | weili <weili@chromium.org> | 2016-05-27 17:58:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-27 17:58:23 -0700 |
commit | dcc29b1f2eb66984a18d54e66851965472675006 (patch) | |
tree | b2ee98c5944bf4d39f80fec6c94031d48065f710 /BUILD.gn | |
parent | 3a005f22703b9303a306bf34cbd17c3729f763aa (diff) | |
download | pdfium-dcc29b1f2eb66984a18d54e66851965472675006.tar.xz |
Match GN and GYP compilation warning flags
For GN build:
Enable chromium_code compilation config for XFA code;
Remove sign-compare suppression;
Limit the strict-overflow warning suppression only to xfa target;
For GYP build:
Remove warning suppression 4800 from GYP non third-party code;
After this, all the warning flags and levels for GN and GYP
builds should match.
BUG=pdfium:29, pdfium:475
Review-Url: https://codereview.chromium.org/2011303003
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -44,14 +44,12 @@ config("pdfium_config") { if (is_win) { cflags += [ "/wd4267" ] } +} - if (is_clang || is_posix) { - # TODO(thestig): Fix all instances, remove this, pdfium:29 - cflags += [ "-Wno-sign-compare" ] - } - +config("xfa_warnings") { + visibility = [ ":*" ] if (is_posix && !is_clang) { # When GCC. - cflags += [ "-Wno-strict-overflow" ] + cflags = [ "-Wno-strict-overflow" ] } } @@ -888,11 +886,7 @@ if (pdf_enable_xfa) { deps = [ ":xfa", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - ":pdfium_config", - "//build/config/compiler:no_chromium_code", - ] + configs += [ ":pdfium_config" ] } static_library("xfa") { @@ -1592,10 +1586,9 @@ if (pdf_enable_xfa) { "//v8:v8_libplatform", ] } - configs -= [ "//build/config/compiler:chromium_code" ] configs += [ ":pdfium_config", - "//build/config/compiler:no_chromium_code", + ":xfa_warnings", ] } } |