Skip to content

Commit 24d59e3

Browse files
authored
Rollup merge of rust-lang#146032 - heiher:loong64-none-no-lsx, r=lqd
Explicity disable LSX feature for `loongarch64-unknown-none` target The `loongarch64-unknown-none` target is a bare-metal target with hardware floating-point support and should not enable SIMD extensions by default. However, LLVM's LoongArch64 backend enables LSX implicitly, inadvertently activating SIMD instructions for this target. This patch explicitly disable LSX feature to prevent unintended SIMD usage.
2 parents 20280b1 + 0b1bc65 commit 24d59e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
1717
arch: "loongarch64".into(),
1818
options: TargetOptions {
1919
cpu: "generic".into(),
20-
features: "+f,+d".into(),
20+
features: "+f,+d,-lsx".into(),
2121
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
2222
linker: Some("rust-lld".into()),
2323
llvm_abiname: "lp64d".into(),

0 commit comments

Comments
 (0)