Skip to content

Commit

Permalink
Auto merge of #88388 - ldm0:outliner, r=nikic
Browse files Browse the repository at this point in the history
Revert "Disable the machine outliner by default"

The fix commit is already in the fork: rust-lang/llvm-project@6c78dbd4ca1f
Linked:
- #85351
- #86020
  • Loading branch information
bors committed Aug 28, 2021
2 parents 05cccdc + bf2f665 commit 84b0183
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ unsafe fn configure_llvm(sess: &Session) {
add("-generate-arange-section", false);
}

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

Expand Down

0 comments on commit 84b0183

Please sign in to comment.