Index: third_party/lzma_sdk/BUILD.gn |
diff --git a/third_party/lzma_sdk/BUILD.gn b/third_party/lzma_sdk/BUILD.gn |
index 2afe7b4f7e307c1c0d82c0591a748184a16f4f17..74fff2dc2bc4df12065e2d1b940c6ccb02e97114 100644 |
--- a/third_party/lzma_sdk/BUILD.gn |
+++ b/third_party/lzma_sdk/BUILD.gn |
@@ -6,6 +6,15 @@ config("lzma_sdk_config") { |
include_dirs = [ "." ] |
} |
+# Must be in a config because of how GN orders flags (otherwise -Wall will |
+# appear after this, and turn it back on). |
+config("clang_warnings") { |
+ if (is_clang) { |
+ # Upstream uses self-assignment to avoid warnings. |
+ cflags = [ "-Wno-self-assign" ] |
+ } |
+} |
+ |
static_library("lzma_sdk") { |
sources = [ |
"7z.h", |
@@ -50,17 +59,9 @@ static_library("lzma_sdk") { |
] |
configs -= [ "//build/config/compiler:chromium_code" ] |
- configs += [ "//build/config/compiler:no_chromium_code" ] |
- |
+ configs += [ |
+ ":clang_warnings", |
+ "//build/config/compiler:no_chromium_code", |
+ ] |
public_configs = [ ":lzma_sdk_config" ] |
- |
- # Must be in a config because of how GN orders flags (otherwise -Wall will |
- # appear after this, and turn it back on). |
- config("clang_warnings") { |
- if (is_clang) { |
- # Upstream uses self-assignment to avoid warnings. |
- cflags = [ "-Wno-self-assign" ] |
- } |
- } |
- configs += [ ":clang_warnings" ] |
} |