Skip to content

Commit 6e0967f

Browse files
committed
Use stdlib PGO in stage 2
1 parent 1ee57ce commit 6e0967f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootstrap/compile.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ impl Step for Std {
115115
}
116116

117117
let is_collecting = if let Some(path) = &builder.config.libstd_profile_generate {
118-
if compiler.stage == 1 {
118+
if compiler.stage == 2 {
119+
eprintln!("STD STAGE 2 GENERATE");
119120
cargo.env("RUST_LIBSTD_PGO", "1");
120121
cargo.rustflag(&format!("-Cprofile-generate={}", path));
121122
// Apparently necessary to avoid overflowing the counters during
@@ -126,7 +127,8 @@ impl Step for Std {
126127
false
127128
}
128129
} else if let Some(path) = &builder.config.libstd_profile_use {
129-
if compiler.stage == 1 {
130+
if compiler.stage == 2 {
131+
eprintln!("STD STAGE 2 USE");
130132
cargo.rustflag(&format!("-Cprofile-use={}", path));
131133
cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function");
132134
true

0 commit comments

Comments
 (0)