Skip to content

Commit ee8a6b7

Browse files
committed
rustc_codegen_llvm: Simplify wide-arithmetic conversion
This commit simplifies conversion of the target feature `wide-arithmetic` on WebAssembly architectures as only the major version is relevant.
1 parent 6361abc commit ee8a6b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
292292
)),
293293
// Support for `wide-arithmetic` will first land in LLVM 20 as part of
294294
// llvm/llvm-project#111598
295-
("wasm32" | "wasm64", "wide-arithmetic") if get_version() < (20, 0, 0) => None,
295+
("wasm32" | "wasm64", "wide-arithmetic") if get_version().0 < 20 => None,
296296
("sparc", "leoncasa") => Some(LLVMFeature::new("hasleoncasa")),
297297
// In LLVM 19, there is no `v8plus` feature and `v9` means "SPARC-V9 instruction available and SPARC-V8+ ABI used".
298298
// https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L27-L28

0 commit comments

Comments
 (0)