diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-01 22:27:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-01 22:27:23 +0200 |
| commit | 9d7d782e50becc7792ea98c203efb69648ae927b (patch) | |
| tree | 8e48d3ad6878edd11afa9bea31cf6cd71323a969 /compiler/rustc_codegen_llvm | |
| parent | 96faee497a2e0d17d4ea7e9b9bedad7bb3a07270 (diff) | |
| parent | 482ad5c51e5cab94b43f823f3cc2f94c87553237 (diff) | |
| download | rust-9d7d782e50becc7792ea98c203efb69648ae927b.tar.gz rust-9d7d782e50becc7792ea98c203efb69648ae927b.zip | |
Rollup merge of #140460 - heiher:issue-140455, r=Urgau
Fix handling of LoongArch target features not supported by LLVM 19 Fixes #140455
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 6412a537a79..507cbf20d89 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -273,6 +273,12 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea ("aarch64", "fpmr") => None, // only existed in 18 ("arm", "fp16") => Some(LLVMFeature::new("fullfp16")), // Filter out features that are not supported by the current LLVM version + ("loongarch64", "div32" | "lam-bh" | "lamcas" | "ld-seq-sa" | "scq") + if get_version().0 < 20 => + { + None + } + // Filter out features that are not supported by the current LLVM version ("riscv32" | "riscv64", "zacas") if get_version().0 < 20 => None, // Enable the evex512 target feature if an avx512 target feature is enabled. ("x86", s) if s.starts_with("avx512") => { |
