Skip to content

Commit 06e6743

Browse files
committed
Always enable MIR inlining when building std
1 parent a98ddb6 commit 06e6743

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/builder.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1933,6 +1933,12 @@ impl<'a> Builder<'a> {
19331933
rustflags.arg("-Zvalidate-mir");
19341934
rustflags.arg(&format!("-Zmir-opt-level={}", mir_opt_level));
19351935
}
1936+
// Always enable inlining MIR when building the standard library.
1937+
// Without this flag, MIR inlining is disabled when incremental compilation is enabled.
1938+
// That causes some mir-opt tests which inline functions from the standard library to
1939+
// break when incremental compilation is enabled. So this overrides the "no inlining
1940+
// during incremental builds" heuristic for the standard library.
1941+
rustflags.arg("-Zinline-mir");
19361942
}
19371943

19381944
Cargo { command: cargo, rustflags, rustdocflags, allow_features }

0 commit comments

Comments
 (0)