summaryrefslogtreecommitdiffstats
path: root/third_party/brotli
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-09-02 10:57:05 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-02 17:57:52 +0000
commit6dd952c77209619a445205998173fc40fb817be1 (patch)
tree19bfb128fb9e34c4be876041cb3e60d88a1a3d6c /third_party/brotli
parent5698e42ca565654da35056bcf03ee42bbf87fd11 (diff)
downloadchromium_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 'third_party/brotli')
-rw-r--r--third_party/brotli/BUILD.gn25
1 files changed, 15 insertions, 10 deletions
diff --git a/third_party/brotli/BUILD.gn b/third_party/brotli/BUILD.gn
index 2975f03..d50c694 100644
--- a/third_party/brotli/BUILD.gn
+++ b/third_party/brotli/BUILD.gn
@@ -2,6 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+config("brotli_warnings") {
+ if (is_clang) {
+ # IncrementalCopyFastPath in decode.c can be unused.
+ # (The file looks very different upstream, this is probably no longer
+ # needed after rolling brotli the next time.)
+ cflags = [ "-Wno-unused-function" ]
+ }
+}
+
source_set("brotli") {
sources = [
"dec/bit_reader.c",
@@ -23,17 +32,13 @@ source_set("brotli") {
"dec/types.h",
]
- config("brotli_warnings") {
- if (is_clang) {
- # IncrementalCopyFastPath in decode.c can be unused.
- # (The file looks very different upstream, this is probably no longer
- # needed after rolling brotli the next time.)
- cflags = [ "-Wno-unused-function" ]
- }
- }
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":brotli_warnings" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code for warning flags to be ordered correctly.
+ ":brotli_warnings",
+ ]
# Since we are never debug brotli, freeze the optimizations to -O2.
if (is_debug) {