diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-01-08 19:17:27 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-01-14 02:18:18 +0100 |
commit | 0cdcefdcc7abfadd427bbf19f1ec9c048cf2e723 (patch) | |
tree | 7d7e4794745883ce98786e5b49610da87945c963 | |
parent | 4f63aa46345fac4e83131463c5bda2887b27cbec (diff) |
build: bring rustc --cfg flag support back
-rw-r--r-- | build_extra/rust/rust.gni | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 61731d21c..60b33d610 100644 --- a/build_extra/rust/rust.gni +++ b/build_extra/rust/rust.gni @@ -45,6 +45,7 @@ template("rust_crate") { forward_variables_from(invoker, [ + "cfg", "crate_name", "crate_type", "crate_version", @@ -214,6 +215,15 @@ template("rust_crate") { args += invoker.args } + if (defined(cfg)) { + foreach(c, cfg) { + args += [ + "--cfg", + "c", + ] + } + } + if (defined(features)) { foreach(f, features) { args += [ |