diff options
Diffstat (limited to 'build_extra/rust/rust.gni')
-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 += [ |