From 0cdcefdcc7abfadd427bbf19f1ec9c048cf2e723 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 8 Jan 2019 19:17:27 +0100 Subject: [PATCH] build: bring rustc --cfg flag support back --- build_extra/rust/rust.gni | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 61731d21c7..60b33d6105 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 += [