summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-05-10 09:50:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-10 09:50:20 -0700
commit245ae9ce1bb854e5e3da400c6d8c8061d81953a9 (patch)
treeefaef1cfea76dd5a3ddd6ada2def6ec87c517de0 /third_party
parentcf03f8ee46e66e244bbe57d34c8667e5edc455b3 (diff)
downloadpdfium-245ae9ce1bb854e5e3da400c6d8c8061d81953a9.tar.xz
Make GYP and GN build consistent for third_party targets
Remove several obsolete warnings from GYP build; Move disabled warning flags closer to the target instead of the whole package for GYP build; Use macro undefine instead of disabled warning for libtiff for GN build. Review-Url: https://codereview.chromium.org/1962863002
Diffstat (limited to 'third_party')
-rw-r--r--third_party/BUILD.gn15
-rw-r--r--third_party/third_party.gyp22
2 files changed, 21 insertions, 16 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 1176e92875..b97a7858ad 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -328,22 +328,17 @@ source_set("fx_lpng") {
}
if (pdf_enable_xfa) {
- config("fx_tiff_warnings") {
- visibility = [ ":*" ]
- if (is_win) {
- cflags = [
- "/wd4005", # Macro redefinition for 'WIN32_LEAN_AND_MEAN'.
- ]
- }
- }
source_set("fx_tiff") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
"../:pdfium_config",
-
- ":fx_tiff_warnings",
]
+ if (is_win) {
+ # Need to undefine the macro since it is redefined in
+ # tif_ojpeg.c and tif_jpeg.c.
+ configs -= [ "//build/config/win:lean_and_mean" ]
+ }
deps = [
"//third_party:jpeg",
]
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index 840c16635d..2e03b59656 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -18,9 +18,6 @@
'<(DEPTH)',
'..',
],
- 'msvs_disabled_warnings': [
- 4018, 4146, 4333, 4345, 4267
- ],
},
'targets': [
{
@@ -96,6 +93,11 @@
'-Wno-unused-function',
],
},
+ 'msvs_disabled_warnings': [
+ # Warnings about conversion from 'size_t' to 'long', possible loss of
+ # data.
+ 4267,
+ ],
},
{
'target_name': 'fx_agg',
@@ -253,7 +255,12 @@
# Avoid warning for undefined behaviour.
'-Wno-shift-negative-value',
],
- }
+ },
+ 'msvs_disabled_warnings': [
+ # Warnings about conversion from 'size_t' to 'long', possible loss of
+ # data.
+ 4267,
+ ],
},
{
'target_name': 'fx_libopenjpeg',
@@ -279,6 +286,9 @@
'libopenjpeg20/tcd.c',
'libopenjpeg20/tgt.c',
],
+ 'msvs_disabled_warnings': [
+ 4018,
+ ],
},
{
'target_name': 'fx_lpng',
@@ -413,8 +423,8 @@
'conditions': [
['OS=="win"', {
'defines!': [
- # Need to undefine the macro since it is redefined in
- # tif_ojpeg.c and tif_jpeg.c.
+ # Need to undefine the macro since it is redefined in
+ # tif_ojpeg.c and tif_jpeg.c.
'WIN32_LEAN_AND_MEAN',
],
}],