bootstrap: Move -Zdual-proc-macros to builder.rs

This commit is contained in:
Alex Crichton 2019-08-15 13:46:54 -07:00
parent 812117af53
commit c36849a542
2 changed files with 1 additions and 7 deletions

View File

@ -124,12 +124,6 @@ fn main() {
cmd.arg("--sysroot").arg(&sysroot);
}
// Link crates to the proc macro crate for the target, but use a host proc macro crate
// to actually run the macros
if env::var_os("RUST_DUAL_PROC_MACROS").is_some() {
cmd.arg("-Zdual-proc-macros");
}
// When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib.

View File

@ -802,7 +802,7 @@ impl<'a> Builder<'a> {
// Build proc macros both for the host and the target
if target != compiler.host && cmd != "check" {
cargo.arg("-Zdual-proc-macros");
cargo.env("RUST_DUAL_PROC_MACROS", "1");
rustflags.arg("-Zdual-proc-macros");
}
},
}