diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-07-22 13:32:34 +0000 | 
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-07-22 13:32:34 +0000 | 
| commit | 36708123c1f73554c7bb5e8a2f0565aa25daef13 (patch) | |
| tree | 89bd04173490c39f9624715dbe7166836f2bb633 /compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs | |
| parent | 42f5419dd29046612138413cbde4567def218341 (diff) | |
| parent | 1eded3619d0e55d57521a259bf27a03906fdfad0 (diff) | |
| download | rust-36708123c1f73554c7bb5e8a2f0565aa25daef13.tar.gz rust-36708123c1f73554c7bb5e8a2f0565aa25daef13.zip | |
Merge commit '1eded3619d0e55d57521a259bf27a03906fdfad0' into sync_cg_clif-2023-07-22
Diffstat (limited to 'compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs b/compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs index 74bba9ed5eb..04097936d03 100644 --- a/compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs +++ b/compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs @@ -6,6 +6,7 @@ use super::path::{Dirs, RelPath}; use super::rustc_info::get_file_name; use super::utils::{ maybe_incremental, remove_dir_if_exists, spawn_and_wait, try_hard_link, CargoProject, Compiler, + LogGroup, }; use super::{CodegenBackend, SysrootKind}; @@ -22,6 +23,8 @@ pub(crate) fn build_sysroot( rustup_toolchain_name: Option<&str>, target_triple: String, ) -> Compiler { + let _guard = LogGroup::guard("Build sysroot"); + eprintln!("[BUILD] sysroot {:?}", sysroot_kind); DIST_DIR.ensure_fresh(dirs); @@ -251,7 +254,10 @@ fn build_clif_sysroot_for_triple( rustflags .push_str(&format!(" --sysroot {}", RTSTARTUP_SYSROOT.to_path(dirs).to_str().unwrap())); if channel == "release" { - rustflags.push_str(" -Zmir-opt-level=3"); + // Incremental compilation by default disables mir inlining. This leads to both a decent + // compile perf and a significant runtime perf regression. As such forcefully enable mir + // inlining. + rustflags.push_str(" -Zinline-mir"); } compiler.rustflags += &rustflags; let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs); | 
