diff options
| author | bors <bors@rust-lang.org> | 2021-08-28 13:10:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-28 13:10:26 +0000 |
| commit | 84b018341284798fa47f8171f4eb04f18f45cf23 (patch) | |
| tree | 7fc8cd9e6af115dd5e1add7bef3b8311fddd2412 /compiler/rustc_codegen_llvm | |
| parent | 05cccdc9b321e6565b3e62e8b52aec53d106ef2f (diff) | |
| parent | bf2f6656bca22c86a1f75efda468a8560c6a43b8 (diff) | |
| download | rust-84b018341284798fa47f8171f4eb04f18f45cf23.tar.gz rust-84b018341284798fa47f8171f4eb04f18f45cf23.zip | |
Auto merge of #88388 - ldm0:outliner, r=nikic
Revert "Disable the machine outliner by default" The fix commit is already in the fork: https://github.com/rust-lang/llvm-project/commit/6c78dbd4ca1f Linked: - https://github.com/rust-lang/rust/issues/85351 - https://github.com/rust-lang/rust/pull/86020
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 0ca51bd2883..3b64ec1a991 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -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); } |
