diff options
author | Brett Wilson <brettw@chromium.org> | 2015-08-31 13:45:07 -0700 |
---|---|---|
committer | Brett Wilson <brettw@chromium.org> | 2015-08-31 13:45:07 -0700 |
commit | 7858c0aae5ee449dafe23c0e1aa0c164ae2889eb (patch) | |
tree | 357d8600ac11bac2e17941c0ee1a0855f3646252 /third_party | |
parent | 0c9f1d8f6dd6bb8b9c3eba73e4ffd0bb2ca4fd97 (diff) | |
download | pdfium-7858c0aae5ee449dafe23c0e1aa0c164ae2889eb.tar.xz |
Move configs out of targets in GN build files.chromium/2500chromium/2499chromium/2498
I'm trying to disallow this since it's confusing. It looks like it provides
scoping for the inner config, but it is actually no different than declaring
the config at the top level. For clarify, all configs and targets should be
declared at the top level.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1328443003 .
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/BUILD.gn | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index 3d8bc77553..21d3d5db32 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -30,17 +30,18 @@ source_set("bigint") { ] } +config("fx_freetype_warnings") { + visibility = [ ":*" ] + if (is_clang) { + # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in + # ftbase.h are unused. + cflags = [ "-Wno-unused-function" ] + } +} + # Tests may link against this even if the production library doesn't, # so it needs to be separate from it. static_library("fx_freetype") { - config("fx_freetype_warnings") { - if (is_clang) { - # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in - # ftbase.h are unused. - cflags = [ "-Wno-unused-function" ] - } - } - configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code", @@ -81,13 +82,15 @@ static_library("fx_freetype") { ] } -source_set("fx_agg") { - config("fx_agg_warnings") { - if (is_clang) { - # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. - cflags = [ "-Wno-unused-function" ] - } +config("fx_agg_warnings") { + visibility = [ ":*" ] + if (is_clang) { + # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. + cflags = [ "-Wno-unused-function" ] } +} + +source_set("fx_agg") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code", @@ -113,18 +116,20 @@ source_set("fx_agg") { ] } -source_set("fx_lcms2") { - config("fx_lcms2_warnings") { - if (is_clang) { - cflags = [ - # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this - # library doesn't appear to have this problem. - "-Wno-missing-braces", - # FindPrev() in cmsplugin.c is unused. - "-Wno-unused-function", - ] - } +config("fx_lcms2_warnings") { + visibility = [ ":*" ] + if (is_clang) { + cflags = [ + # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this + # library doesn't appear to have this problem. + "-Wno-missing-braces", + # FindPrev() in cmsplugin.c is unused. + "-Wno-unused-function", + ] } +} + +source_set("fx_lcms2") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code", |