Skip to content

Commit e6d4236

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

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)