diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-12-02 21:47:41 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-03-05 00:36:24 +0100 |
| commit | e501a87e895221dfe7475c6739feffe4bbca04eb (patch) | |
| tree | 37bbca32d36c6234eedf8009653533d503821053 /src/bootstrap/bin/rustc.rs | |
| parent | c3c1c8d4e0f01c869f8381e70fbd4d103534493f (diff) | |
| download | rust-e501a87e895221dfe7475c6739feffe4bbca04eb.tar.gz rust-e501a87e895221dfe7475c6739feffe4bbca04eb.zip | |
Bootstrap changes
Diffstat (limited to 'src/bootstrap/bin/rustc.rs')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 70e4a69a07d..ca86aeb8100 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -109,6 +109,12 @@ fn main() { cmd.arg("-Zexternal-macro-backtrace"); + // 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. @@ -258,13 +264,6 @@ fn main() { } } - // Force all crates compiled by this compiler to (a) be unstable and (b) - // allow the `rustc_private` feature to link to other unstable crates - // also in the sysroot. - if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() { - cmd.arg("-Z").arg("force-unstable-if-unmarked"); - } - if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { cmd.arg("--remap-path-prefix").arg(&map); } @@ -284,6 +283,14 @@ fn main() { } } + // Force all crates compiled by this compiler to (a) be unstable and (b) + // allow the `rustc_private` feature to link to other unstable crates + // also in the sysroot. We also do this for host crates, since those + // may be proc macros, in which case we might ship them. + if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() && (stage != "0" || target.is_some()) { + cmd.arg("-Z").arg("force-unstable-if-unmarked"); + } + if env::var_os("RUSTC_PARALLEL_COMPILER").is_some() { cmd.arg("--cfg").arg("parallel_compiler"); } |
