diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2020-06-15 07:54:20 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2020-06-29 06:53:56 -0700 |
| commit | 3dfbf0bc738d1ba4ee0f084ce3f32074fceee3bb (patch) | |
| tree | 54678795484d74b5c191335f7927f1c7c5475449 /src/bootstrap/bin | |
| parent | 9672b5e95c520774cc17bffc7031c80a1bcf4b4c (diff) | |
| download | rust-3dfbf0bc738d1ba4ee0f084ce3f32074fceee3bb.tar.gz rust-3dfbf0bc738d1ba4ee0f084ce3f32074fceee3bb.zip | |
rustbuild: Move compiler-builtins build logic to manifest
This commit moves the compiler-builtins-specific build logic from `src/bootstrap/bin/rustc.rs` into the workspace `Cargo.toml`'s `[profile]` configuration. Now that rust-lang/cargo#7253 is fixed we can ensure that Cargo knows about debug assertions settings, and it can also be configured to specifically disable debug assertions unconditionally for compiler-builtins. This should improve rebuild logic when debug-assertions settings change and also improve build-std integration where Cargo externally now has an avenue to learn how to build compiler-builtins as well.
Diffstat (limited to 'src/bootstrap/bin')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index a8c00c8c3ca..3072a4a1ae7 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -101,30 +101,6 @@ fn main() { { cmd.arg("-C").arg("panic=abort"); } - - // Set various options from config.toml to configure how we're building - // code. - let debug_assertions = match env::var("RUSTC_DEBUG_ASSERTIONS") { - Ok(s) => { - if s == "true" { - "y" - } else { - "n" - } - } - Err(..) => "n", - }; - - // The compiler builtins are pretty sensitive to symbols referenced in - // libcore and such, so we never compile them with debug assertions. - // - // FIXME(rust-lang/cargo#7253) we should be doing this in `builder.rs` - // with env vars instead of doing it here in this script. - if crate_name == Some("compiler_builtins") { - cmd.arg("-C").arg("debug-assertions=no"); - } else { - cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions)); - } } else { // FIXME(rust-lang/cargo#5754) we shouldn't be using special env vars // here, but rather Cargo should know what flags to pass rustc itself. |
