I noticed that after the release of Rust 1.84, the lsx extension set has been enabled by default for loongarch64: Rust PR #132140.
However, some of my loongarch embedded SoCs do not support lsx. I tried adding RUSTFLAGS="-C target-feature=-lsx" during the cargo build, but I encountered the following error:
warning: unstable feature specified for `-Ctarget-feature`: `lsx`
|
= note: this feature is not stably supported; its behavior can change in the future
I don't know the answer, but it seems like a regression to me if Rust suddenly changed the meaning of a target like thst. Probably worth reporting a bug about this.
That is a warning, not an error. If the resulting executable is still using lsx, that would be because the standard library was compiled with lsx. If you are on nightly, you can tell cargo to recompile the standard library with RUSTFLAGS="-Ctarget-feature=-lsx" cargo build -Zbuild-std --target loongarch64-unknown-linux-musl (or -gnu if you use glibc rather than musl)