summaryrefslogtreecommitdiffstats
path: root/sdch
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-31 13:41:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-31 20:42:50 +0000
commit4af2eac8e84692d94f88504ab6e0b244b88dddcb (patch)
tree216e4c278ec0aa4ad07ab82cac8b19157de503db /sdch
parent41f132e4a0ed599b090ec1070451d970cb5bbbf4 (diff)
downloadchromium_src-4af2eac8e84692d94f88504ab6e0b244b88dddcb.zip
chromium_src-4af2eac8e84692d94f88504ab6e0b244b88dddcb.tar.gz
chromium_src-4af2eac8e84692d94f88504ab6e0b244b88dddcb.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. Review URL: https://codereview.chromium.org/1318823008 Cr-Commit-Position: refs/heads/master@{#346461}
Diffstat (limited to 'sdch')
-rw-r--r--sdch/BUILD.gn24
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) {