diff options
| author | Taiki Endo <te316e89@gmail.com> | 2024-09-27 10:44:04 +0900 |
|---|---|---|
| committer | Taiki Endo <te316e89@gmail.com> | 2024-09-28 11:26:09 +0900 |
| commit | 62612af37223d21374741cb81d91c23d2f49076e (patch) | |
| tree | 47a251d8ac8e94e681d383956df311dfff8c7c37 /compiler/rustc_codegen_llvm/src | |
| parent | 83e4e188961759abd1b685a39bd1147821a576c0 (diff) | |
| download | rust-62612af37223d21374741cb81d91c23d2f49076e.tar.gz rust-62612af37223d21374741cb81d91c23d2f49076e.zip | |
rustc_target: Add RISC-V atomic-related features
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index a2a5499597c..3ed9d39b38b 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -264,6 +264,10 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea ("riscv32" | "riscv64", "unaligned-scalar-mem") if get_version().0 == 18 => { Some(LLVMFeature::new("fast-unaligned-access")) } + // Filter out features that are not supported by the current LLVM version + ("riscv32" | "riscv64", "zaamo") if get_version().0 < 19 => None, + ("riscv32" | "riscv64", "zabha") if get_version().0 < 19 => None, + ("riscv32" | "riscv64", "zalrsc") if get_version().0 < 19 => None, // Enable the evex512 target feature if an avx512 target feature is enabled. ("x86", s) if s.starts_with("avx512") => { Some(LLVMFeature::with_dependency(s, TargetFeatureFoldStrength::EnableOnly("evex512"))) |
