Skip to content

Commit b5d21e0

Browse files
committed
rustc_target: add known safe s390x target features
1 parent 99b7134 commit b5d21e0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,7 @@ symbols! {
16891689
rvalue_static_promotion,
16901690
rwpi,
16911691
s,
1692+
s390x_target_feature,
16921693
safety,
16931694
sanitize,
16941695
sanitizer_cfi_generalize_pointers,

compiler/rustc_target/src/target_features.rs

+9
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,13 @@ const LOONGARCH_ALLOWED_FEATURES: &[(&str, Stability)] = &[
391391
// tidy-alphabetical-end
392392
];
393393

394+
const IBMZ_ALLOWED_FEATURES: &[(&str, Stability)] = &[
395+
// tidy-alphabetical-start
396+
("backchain", Unstable(sym::s390x_target_feature)),
397+
("vector", Unstable(sym::s390x_target_feature)),
398+
// tidy-alphabetical-end
399+
];
400+
394401
/// When rustdoc is running, provide a list of all known features so that all their respective
395402
/// primitives may be documented.
396403
///
@@ -408,6 +415,7 @@ pub fn all_known_features() -> impl Iterator<Item = (&'static str, Stability)> {
408415
.chain(BPF_ALLOWED_FEATURES.iter())
409416
.chain(CSKY_ALLOWED_FEATURES)
410417
.chain(LOONGARCH_ALLOWED_FEATURES)
418+
.chain(IBMZ_ALLOWED_FEATURES)
411419
.cloned()
412420
}
413421

@@ -425,6 +433,7 @@ impl super::spec::Target {
425433
"bpf" => BPF_ALLOWED_FEATURES,
426434
"csky" => CSKY_ALLOWED_FEATURES,
427435
"loongarch64" => LOONGARCH_ALLOWED_FEATURES,
436+
"s390x" => IBMZ_ALLOWED_FEATURES,
428437
_ => &[],
429438
}
430439
}

0 commit comments

Comments
 (0)