diff options
| author | Lukas Markeffsky <@> | 2022-12-26 22:01:53 +0100 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-12-28 09:18:43 -0500 |
| commit | fdf6cc34b2564100c5d07b573ef246124ee45b47 (patch) | |
| tree | c8dba4e6ad1885186c89c184d23a453a1c29341e /src/bootstrap | |
| parent | 11191279b721b326d545005b96ad9eecc7a95827 (diff) | |
| download | rust-fdf6cc34b2564100c5d07b573ef246124ee45b47.tar.gz rust-fdf6cc34b2564100c5d07b573ef246124ee45b47.zip | |
delete more `cfg(bootstrap)`
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/compile.rs | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 427e1a3863e..ae5dfdea19f 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -691,26 +691,23 @@ impl Step for Rustc { )); } - // cfg(bootstrap): remove if condition once the bootstrap compiler supports dylib LTO - if compiler.stage != 0 { - match builder.config.rust_lto { - RustcLto::Thin | RustcLto::Fat => { - // Since using LTO for optimizing dylibs is currently experimental, - // we need to pass -Zdylib-lto. - cargo.rustflag("-Zdylib-lto"); - // Cargo by default passes `-Cembed-bitcode=no` and doesn't pass `-Clto` when - // compiling dylibs (and their dependencies), even when LTO is enabled for the - // crate. Therefore, we need to override `-Clto` and `-Cembed-bitcode` here. - let lto_type = match builder.config.rust_lto { - RustcLto::Thin => "thin", - RustcLto::Fat => "fat", - _ => unreachable!(), - }; - cargo.rustflag(&format!("-Clto={}", lto_type)); - cargo.rustflag("-Cembed-bitcode=yes"); - } - RustcLto::ThinLocal => { /* Do nothing, this is the default */ } + match builder.config.rust_lto { + RustcLto::Thin | RustcLto::Fat => { + // Since using LTO for optimizing dylibs is currently experimental, + // we need to pass -Zdylib-lto. + cargo.rustflag("-Zdylib-lto"); + // Cargo by default passes `-Cembed-bitcode=no` and doesn't pass `-Clto` when + // compiling dylibs (and their dependencies), even when LTO is enabled for the + // crate. Therefore, we need to override `-Clto` and `-Cembed-bitcode` here. + let lto_type = match builder.config.rust_lto { + RustcLto::Thin => "thin", + RustcLto::Fat => "fat", + _ => unreachable!(), + }; + cargo.rustflag(&format!("-Clto={}", lto_type)); + cargo.rustflag("-Cembed-bitcode=yes"); } + RustcLto::ThinLocal => { /* Do nothing, this is the default */ } } builder.info(&format!( |
