summaryrefslogtreecommitdiffstats
path: root/third_party/libpng/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libpng/BUILD.gn')
-rw-r--r--third_party/libpng/BUILD.gn17
1 files changed, 9 insertions, 8 deletions
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index c4e2650c..2142059 100644
--- a/third_party/libpng/BUILD.gn
+++ b/third_party/libpng/BUILD.gn
@@ -25,6 +25,15 @@ config("libpng_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" ]
+ }
+}
+
source_set("libpng_sources") {
sources = [
"png.c",
@@ -62,14 +71,6 @@ source_set("libpng_sources") {
"//third_party/zlib",
]
- # 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" ]
}