summaryrefslogtreecommitdiffstats
path: root/third_party/libxslt/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libxslt/BUILD.gn')
-rw-r--r--third_party/libxslt/BUILD.gn33
1 files changed, 19 insertions, 14 deletions
diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn
index 6b46db3..3f27c5de5 100644
--- a/third_party/libxslt/BUILD.gn
+++ b/third_party/libxslt/BUILD.gn
@@ -7,6 +7,19 @@ config("libxslt_config") {
include_dirs = [ "." ]
}
+config("libxslt_warnings") {
+ if (is_clang) {
+ cflags = [
+ # libxslt stores a char[3] in a `const unsigned char*`.
+ "-Wno-pointer-sign",
+
+ # xsltDefaultRegion and xsltCalibrateTimestamps are only
+ # used with certain preprocessor defines set.
+ "-Wno-unused-function",
+ ]
+ }
+}
+
static_library("libxslt") {
sources = [
"libxslt/attributes.c",
@@ -59,21 +72,13 @@ static_library("libxslt") {
"win32/config.h",
]
- config("libxslt_warnings") {
- if (is_clang) {
- cflags = [
- # libxslt stores a char[3] in a `const unsigned char*`.
- "-Wno-pointer-sign",
-
- # xsltDefaultRegion and xsltCalibrateTimestamps are only
- # used with certain preprocessor defines set.
- "-Wno-unused-function",
- ]
- }
- }
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":libxslt_warnings" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code for warning flags to be ordered correctly.
+ ":libxslt_warnings",
+ ]
public_configs = [ ":libxslt_config" ]
cflags = []