From fd92015fe669fb21d656303dba99e50c90f87a5b Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Wed, 20 Jul 2022 17:19:29 +0200 Subject: [PATCH] [perf] Don't emit noalias for box when compiling rustc itself This compiles rustc without noalias on box to evaluate the performance impact of such a change on a large scale project like rustc. Most importantly, this does NOT change the emitting of noalias when compiling crates other than rustc, to avoid perf impacts from LLVM having to process less attributes like in #98017. --- src/bootstrap/builder.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 575cbc3beb2e7..af4f0abc64b5a 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1403,6 +1403,7 @@ impl<'a> Builder<'a> { cargo.args(s.split_whitespace()); } rustflags.env("RUSTFLAGS_NOT_BOOTSTRAP"); + rustflags.arg("-Zbox-noalias=no"); } else { if let Ok(s) = env::var("CARGOFLAGS_BOOTSTRAP") { cargo.args(s.split_whitespace());