diff --git a/build_extra/rust/BUILD.gn b/build_extra/rust/BUILD.gn index b529f2f5ac..e3fc6db5f5 100644 --- a/build_extra/rust/BUILD.gn +++ b/build_extra/rust/BUILD.gn @@ -187,9 +187,9 @@ rust_component("ws2_32") { rust_component("futures") { source_root = "$registry_github/futures-0.1.23/src/lib.rs" - cfg = [ - "feature=\"use_std\"", - "feature=\"with-deprecated\"", + features = [ + "use_std", + "with-deprecated", ] } @@ -298,6 +298,7 @@ rust_component("crossbeam_deque") { rust_component("crossbeam_epoch") { source_root = "$registry_github/crossbeam-epoch-0.5.1/src/lib.rs" + features = [ "use_std" ] extern = [ ":arrayvec", ":cfg_if", @@ -306,13 +307,12 @@ rust_component("crossbeam_epoch") { ":memoffset", ":scopeguard", ] - cfg = [ "feature=\"use_std\"" ] } rust_component("crossbeam_utils") { source_root = "$registry_github/crossbeam-utils-0.4.1/src/lib.rs" + features = [ "use_std" ] extern = [ ":cfg_if" ] - cfg = [ "feature=\"use_std\"" ] } rust_component("arrayvec") { @@ -334,7 +334,7 @@ rust_component("memoffset") { rust_component("scopeguard") { source_root = "$registry_github/scopeguard-0.3.3/src/lib.rs" - cfg = [ "feature=\"use_std\"" ] + features = [ "use_std" ] } rust_component("num_cpus") { diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 21b3972827..8f63bcc087 100644 --- a/build_extra/rust/rust.gni +++ b/build_extra/rust/rust.gni @@ -40,7 +40,6 @@ template("run_rustc") { assert(defined(invoker.source_root), "Must specify source_root") forward_variables_from(invoker, [ - "cfg", "crate_name", "crate_type", "crate_version", @@ -123,15 +122,6 @@ template("run_rustc") { args += [ "--test" ] } - if (defined(cfg)) { - foreach(c, cfg) { - args += [ - "--cfg", - c, - ] - } - } - if (defined(features)) { foreach(f, features) { args += [ @@ -210,7 +200,6 @@ template("rust_component") { forward_variables_from(invoker, [ "args", - "cfg", "crate_version", "deps", "extern",