Skip to content

Commit efcf35e

Browse files
committed
rustc_target: add known safe s390x target features
1 parent 032be6f commit efcf35e

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
@@ -397,6 +397,13 @@ const LOONGARCH_ALLOWED_FEATURES: &[(&str, Stability)] = &[
397397
// tidy-alphabetical-end
398398
];
399399

400+
const IBMZ_ALLOWED_FEATURES: &[(&str, Stability)] = &[
401+
// tidy-alphabetical-start
402+
("backchain", Unstable(sym::s390x_target_feature)),
403+
("vector", Unstable(sym::s390x_target_feature)),
404+
// tidy-alphabetical-end
405+
];
406+
400407
/// When rustdoc is running, provide a list of all known features so that all their respective
401408
/// primitives may be documented.
402409
///
@@ -414,6 +421,7 @@ pub fn all_known_features() -> impl Iterator<Item = (&'static str, Stability)> {
414421
.chain(BPF_ALLOWED_FEATURES.iter())
415422
.chain(CSKY_ALLOWED_FEATURES)
416423
.chain(LOONGARCH_ALLOWED_FEATURES)
424+
.chain(IBMZ_ALLOWED_FEATURES)
417425
.cloned()
418426
}
419427

@@ -431,6 +439,7 @@ impl super::spec::Target {
431439
"bpf" => BPF_ALLOWED_FEATURES,
432440
"csky" => CSKY_ALLOWED_FEATURES,
433441
"loongarch64" => LOONGARCH_ALLOWED_FEATURES,
442+
"s390x" => IBMZ_ALLOWED_FEATURES,
434443
_ => &[],
435444
}
436445
}

0 commit comments

Comments
 (0)