- perform PGO for rustc via opt-dist tool (addresses 19273): - various backports (available in 1.90.0) to match our environment better and fix some bugs - do not profile LLVM, because it makes backend performance even worse: rust-lang/rust\#144318 - on UCRT64 do a separate LLVM build with clang+lld so it will be linkable with PGOed rustc - bootstrap.toml changes to match requirements for opt-dist (and get some more optimizations) - CXXFLAGS workaround to actually perform LTO for llvm-wrapper (from rustc_llvm) - ensure that clang+lld is used for whole build
12 lines
542 B
Diff
12 lines
542 B
Diff
we don't need tools when collecting profiles with opt-dist
|
|
--- a/src/bootstrap/src/core/build_steps/llvm.rs
|
|
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
|
|
@@ -349,6 +349,7 @@
|
|
cfg.define("LLVM_INSTALL_UTILS", "ON");
|
|
|
|
if builder.config.llvm_profile_generate {
|
|
+ cfg.define("LLVM_INCLUDE_TOOLS", "OFF");
|
|
cfg.define("LLVM_BUILD_INSTRUMENTED", "IR");
|
|
if let Ok(llvm_profile_dir) = std::env::var("LLVM_PROFILE_DIR") {
|
|
cfg.define("LLVM_PROFILE_DATA_DIR", llvm_profile_dir);
|