Skip to content

Commit

Permalink
build: bring rustc --cfg flag support back
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Jan 14, 2019
1 parent 4f63aa4 commit 0cdcefd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build_extra/rust/rust.gni
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ template("rust_crate") {

forward_variables_from(invoker,
[
"cfg",
"crate_name",
"crate_type",
"crate_version",
Expand Down Expand Up @@ -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 += [
Expand Down

0 comments on commit 0cdcefd

Please sign in to comment.