Always enable MIR inlining when building std

This commit is contained in:
Ben Kimock 2023-03-11 21:11:04 -05:00
parent a98ddb6de1
commit 06e674313b

View File

@ -1933,6 +1933,12 @@ impl<'a> Builder<'a> {
rustflags.arg("-Zvalidate-mir");
rustflags.arg(&format!("-Zmir-opt-level={}", mir_opt_level));
}
// Always enable inlining MIR when building the standard library.
// Without this flag, MIR inlining is disabled when incremental compilation is enabled.
// That causes some mir-opt tests which inline functions from the standard library to
// break when incremental compilation is enabled. So this overrides the "no inlining
// during incremental builds" heuristic for the standard library.
rustflags.arg("-Zinline-mir");
}
Cargo { command: cargo, rustflags, rustdocflags, allow_features }