Skip to content

Commit f20103f

Browse files
committed
rustc_codegen_llvm: adapt for LLVM 20 changes
No functional changes intended. LLVM 20 uses a different name for this feature.
1 parent 9b82580 commit f20103f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
235235
("aarch64", "pmuv3") => Some(LLVMFeature::new("perfmon")),
236236
("aarch64", "paca") => Some(LLVMFeature::new("pauth")),
237237
("aarch64", "pacg") => Some(LLVMFeature::new("pauth")),
238-
("aarch64", "sve-b16b16") => Some(LLVMFeature::new("b16b16")),
238+
("aarch64", "sve-b16b16") => {
239+
Some(LLVMFeature::new(if get_version().0 < 20 { "b16b16" } else { "sve-b16b16" }))
240+
}
239241
("aarch64", "flagm2") => Some(LLVMFeature::new("altnzcv")),
240242
// Rust ties fp and neon together.
241243
("aarch64", "neon") => {

0 commit comments

Comments
 (0)