diff options
author | brettw <brettw@chromium.org> | 2015-09-14 11:38:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-14 18:39:47 +0000 |
commit | 7c0c67ed3859656cb869fb517527938f70ed0cc6 (patch) | |
tree | c4aeb54bb9acb00f4b1cba311ae4d7d31d65ea6b | |
parent | 7bf49a3df73ba892210a387735b6d6b52dd88600 (diff) | |
download | chromium_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.gn | 10 | ||||
-rw-r--r-- | build/toolchain/win/midl.gni | 16 |
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" ] } } |