Skip to content

Commit 6e10c31

Browse files
committed
rustc_target: Use "B" shorthand on the RISC-V Android target
The "B" extension is ratified as a combination of three extensions: "Zba", "Zbb" and "Zbs". To maximize discoverability of the RISC-V target features, this commit makes use of the "B" extension instead of its three members. This way, `#[cfg(target_feature = "b")]` can also be used instead of: `#[cfg(all(target_feature = "zba", target_feature = "zbb", target_feature = "zbs"))]`
1 parent 3055fa9 commit 6e10c31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) fn target() -> Target {
1919
options: TargetOptions {
2020
code_model: Some(CodeModel::Medium),
2121
cpu: "generic-rv64".into(),
22-
features: "+m,+a,+f,+d,+c,+zicsr,+zifencei,+zba,+zbb,+zbs,+v".into(),
22+
features: "+m,+a,+f,+d,+c,+b,+v,+zicsr,+zifencei".into(),
2323
llvm_abiname: "lp64d".into(),
2424
supported_sanitizers: SanitizerSet::ADDRESS,
2525
max_atomic_width: Some(64),

0 commit comments

Comments
 (0)