diff options
author | brettw <brettw@chromium.org> | 2015-09-02 10:57:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-02 17:57:52 +0000 |
commit | 6dd952c77209619a445205998173fc40fb817be1 (patch) | |
tree | 19bfb128fb9e34c4be876041cb3e60d88a1a3d6c /sdch/BUILD.gn | |
parent | 5698e42ca565654da35056bcf03ee42bbf87fd11 (diff) | |
download | chromium_src-6dd952c77209619a445205998173fc40fb817be1.zip chromium_src-6dd952c77209619a445205998173fc40fb817be1.tar.gz chromium_src-6dd952c77209619a445205998173fc40fb817be1.tar.bz2 |
Un-nest configs in GN files.
People sometimes nest targets or configs, usually with the assumption that this limits the visibility of a config to within a target. But this nesting provides no visibility restrictions over declaring it outside of a block.
Un-nest for clarity.
Re-land of http://crrev.com/1318823008 while preserving config ordering.
Review URL: https://codereview.chromium.org/1307223010
Cr-Commit-Position: refs/heads/master@{#346964}
Diffstat (limited to 'sdch/BUILD.gn')
-rw-r--r-- | sdch/BUILD.gn | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sdch/BUILD.gn b/sdch/BUILD.gn index 6121dfc..4c6c520 100644 --- a/sdch/BUILD.gn +++ b/sdch/BUILD.gn @@ -6,6 +6,17 @@ config("sdch_config") { include_dirs = [ "open-vcdiff/src" ] } +# gn orders flags on a target before flags from configs. The default config +# adds -Wall, and these flags have to be after -Wall -- so they need to come +# from a config and can't be on the target directly. +config("sdch_warnings") { + cflags = [] + if (is_linux) { + # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11: + cflags += [ "-Wno-deprecated-declarations" ] + } +} + static_library("sdch") { sources = [ "logging_forward.h", @@ -42,6 +53,7 @@ static_library("sdch") { "open-vcdiff/vsprojects/stdint.h", ] + configs += [ ":sdch_warnings" ] public_configs = [ ":sdch_config" ] deps = [ @@ -49,18 +61,6 @@ static_library("sdch") { "//third_party/zlib", ] - # gn orders flags on a target before flags from configs. The default config - # adds -Wall, and these flags have to be after -Wall -- so they need to come - # from a config and can't be on the target directly. - config("sdch_warnings") { - cflags = [] - if (is_linux) { - # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11: - cflags += [ "-Wno-deprecated-declarations" ] - } - } - configs += [ ":sdch_warnings" ] - if (is_linux || is_android) { include_dirs = [ "linux" ] } else if (is_ios) { |