about summary refs log tree commit diff
path: root/src/bootstrap/bin
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-12-28 15:01:21 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-12-30 09:06:57 -0800
commit254876ee73addc736eac3c6dca287a8be83eb3ef (patch)
treed34458f6ff08ef155e2585b36c8958422ea3dd28 /src/bootstrap/bin
parent7f2d2afa9196ba6314a29e58d5324dbd9923c75e (diff)
downloadrust-254876ee73addc736eac3c6dca287a8be83eb3ef.tar.gz
rust-254876ee73addc736eac3c6dca287a8be83eb3ef.zip
rustbuild: Compile all support tools in stage0
This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
Diffstat (limited to 'src/bootstrap/bin')
-rw-r--r--src/bootstrap/bin/rustc.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 129798836e0..90fd31ecbdd 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -89,7 +89,9 @@ fn main() {
         // 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.
-        cmd.arg("-Cprefer-dynamic");
+        if env::var_os("RUSTC_NO_PREFER_DYNAMIC").is_none() {
+            cmd.arg("-Cprefer-dynamic");
+        }
 
         // Help the libc crate compile by assisting it in finding the MUSL
         // native libraries.