summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-09-14 11:38:27 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-14 18:39:47 +0000
commit7c0c67ed3859656cb869fb517527938f70ed0cc6 (patch)
treec4aeb54bb9acb00f4b1cba311ae4d7d31d65ea6b
parent7bf49a3df73ba892210a387735b6d6b52dd88600 (diff)
downloadchromium_src-7c0c67ed3859656cb869fb517527938f70ed0cc6.zip
chromium_src-7c0c67ed3859656cb869fb517527938f70ed0cc6.tar.gz
chromium_src-7c0c67ed3859656cb869fb517527938f70ed0cc6.tar.bz2
Fix nested config in GN.
This also moves the config out of the template. Otherwise this will generate an error if there is more than one MIDL target in the same directory. Use forward_variables_from in the MIDL template. TBR=dpranke@chromium.org Review URL: https://codereview.chromium.org/1335283002 Cr-Commit-Position: refs/heads/master@{#348664}
-rw-r--r--build/config/win/BUILD.gn10
-rw-r--r--build/toolchain/win/midl.gni16
2 files changed, 13 insertions, 13 deletions
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index b558695..ba28c5e 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -195,3 +195,13 @@ config("target_winrt") {
"/EHsc",
]
}
+
+# Internal stuff --------------------------------------------------------------
+
+# Config used by the MIDL template to disable warnings.
+config("midl_warnings") {
+ if (is_clang) {
+ # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_".
+ cflags = [ "-Wno-extra-tokens" ]
+ }
+}
diff --git a/build/toolchain/win/midl.gni b/build/toolchain/win/midl.gni
index 3e7fbec..96acd66 100644
--- a/build/toolchain/win/midl.gni
+++ b/build/toolchain/win/midl.gni
@@ -84,15 +84,11 @@ template("midl") {
"/Oicf",
]
- if (defined(invoker.deps)) {
- deps = invoker.deps
- }
+ forward_variables_from(invoker, [ "deps" ])
}
source_set(target_name) {
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
+ forward_variables_from(invoker, [ "visibility" ])
# We only compile the IID files from the IDL tool rather than all outputs.
sources = process_file_template(invoker.sources,
@@ -102,12 +98,6 @@ template("midl") {
":$action_name",
]
- config("midl_warnings") {
- if (is_clang) {
- # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_"
- cflags = [ "-Wno-extra-tokens" ]
- }
- }
- configs += [ ":midl_warnings" ]
+ configs += [ "//build/config/win:midl_warnings" ]
}
}