summaryrefslogtreecommitdiffstats
path: root/third_party/brotli/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/brotli/BUILD.gn')
-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) {