-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs | ||
index dea574a5..498a2c7e 100644 | ||
--- a/compiler/rustc_codegen_llvm/src/abi.rs | ||
+++ b/compiler/rustc_codegen_llvm/src/abi.rs | ||
@@ -433,7 +433,7 @@ fn apply_attrs_llfn( | ||
|
||
let apply_range_attr = |idx: AttributePlace, scalar: rustc_target::abi::Scalar| { | ||
if cx.sess().opts.optimize != config::OptLevel::No | ||
- && llvm_util::get_version() >= (19, 0, 0) | ||
+ && (llvm_util::get_version() >= (19, 0, 0) && false) | ||
&& matches!(scalar.primitive(), Int(..)) | ||
// If the value is a boolean, the range is 0..2 and that ultimately | ||
// become 0..0 when the type becomes i1, which would be rejected | ||
@@ -570,7 +570,7 @@ fn apply_attrs_callsite(&self, bx: &mut Builder<'_, 'll, 'tcx>, callsite: &'ll V | ||
_ => {} | ||
} | ||
if bx.cx.sess().opts.optimize != config::OptLevel::No | ||
- && llvm_util::get_version() < (19, 0, 0) | ||
+ && (llvm_util::get_version() < (19, 0, 0) || true) | ||
&& let abi::Abi::Scalar(scalar) = self.ret.layout.abi | ||
&& matches!(scalar.primitive(), Int(..)) | ||
// If the value is a boolean, the range is 0..2 and that ultimately | ||
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs | ||
index 01aae24a..cc2fc532 100644 | ||
--- a/compiler/rustc_codegen_llvm/src/context.rs | ||
+++ b/compiler/rustc_codegen_llvm/src/context.rs | ||
@@ -131,7 +131,7 @@ pub(crate) unsafe fn create_module<'ll>( | ||
} | ||
} | ||
|
||
- if llvm_version < (19, 0, 0) { | ||
+ if llvm_version < (19, 0, 0) || true { | ||
if sess.target.arch == "aarch64" || sess.target.arch.starts_with("arm64") { | ||
// LLVM 19 sets -Fn32 in its data layout string for 64-bit ARM | ||
// Earlier LLVMs leave this default, so remove it. | ||
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | ||
index ed12318c..870a1d0b 100644 | ||
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | ||
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | ||
@@ -401,7 +401,7 @@ extern "C" LLVMAttributeRef | ||
LLVMRustCreateRangeAttribute(LLVMContextRef C, unsigned NumBits, | ||
const uint64_t LowerWords[], | ||
const uint64_t UpperWords[]) { | ||
-#if LLVM_VERSION_GE(19, 0) | ||
+#if LLVM_VERSION_GE(19, 0) && 0 | ||
return LLVMCreateConstantRangeAttribute(C, Attribute::Range, NumBits, | ||
LowerWords, UpperWords); | ||
#else | ||
@@ -2051,7 +2051,7 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler( | ||
} | ||
} | ||
if (DiagnosticHandlerCallback) { | ||
-#if LLVM_VERSION_GE(19, 0) | ||
+#if LLVM_VERSION_GE(19, 0) && 0 | ||
DiagnosticHandlerCallback(&DI, DiagnosticHandlerContext); | ||
#else | ||
DiagnosticHandlerCallback(DI, DiagnosticHandlerContext); |