Skip to content

Commit 84b0183

Browse files
committed
Auto merge of rust-lang#88388 - ldm0:outliner, r=nikic
Revert "Disable the machine outliner by default" The fix commit is already in the fork: rust-lang/llvm-project@6c78dbd4ca1f Linked: - rust-lang#85351 - rust-lang#86020
2 parents 05cccdc + bf2f665 commit 84b0183

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,14 @@ unsafe fn configure_llvm(sess: &Session) {
8989
add("-generate-arange-section", false);
9090
}
9191

92-
// FIXME(nagisa): disable the machine outliner by default in LLVM versions 11, where it was
93-
// introduced and up.
92+
// Disable the machine outliner by default in LLVM versions 11 and LLVM
93+
// version 12, where it leads to miscompilation.
9494
//
95-
// This should remain in place until https://reviews.llvm.org/D103167 is fixed. If LLVM
96-
// has been upgraded since, consider adjusting the version check below to contain an upper
97-
// bound.
98-
if llvm_util::get_version() >= (11, 0, 0) {
95+
// Ref:
96+
// - https://github.com/rust-lang/rust/issues/85351
97+
// - https://reviews.llvm.org/D103167
98+
let llvm_version = llvm_util::get_version();
99+
if llvm_version >= (11, 0, 0) && llvm_version < (13, 0, 0) {
99100
add("-enable-machine-outliner=never", false);
100101
}
101102

0 commit comments

Comments
 (0)