1
Fork 0

rustc_target: add known safe s390x target features

This commit is contained in:
liushuyu 2024-07-09 14:32:17 +08:00
parent 032be6f7bb
commit efcf35e524
2 changed files with 10 additions and 0 deletions

View file

@ -1689,6 +1689,7 @@ symbols! {
rvalue_static_promotion, rvalue_static_promotion,
rwpi, rwpi,
s, s,
s390x_target_feature,
safety, safety,
sanitize, sanitize,
sanitizer_cfi_generalize_pointers, sanitizer_cfi_generalize_pointers,

View file

@ -397,6 +397,13 @@ const LOONGARCH_ALLOWED_FEATURES: &[(&str, Stability)] = &[
// tidy-alphabetical-end // tidy-alphabetical-end
]; ];
const IBMZ_ALLOWED_FEATURES: &[(&str, Stability)] = &[
// tidy-alphabetical-start
("backchain", Unstable(sym::s390x_target_feature)),
("vector", Unstable(sym::s390x_target_feature)),
// tidy-alphabetical-end
];
/// When rustdoc is running, provide a list of all known features so that all their respective /// When rustdoc is running, provide a list of all known features so that all their respective
/// primitives may be documented. /// primitives may be documented.
/// ///
@ -414,6 +421,7 @@ pub fn all_known_features() -> impl Iterator<Item = (&'static str, Stability)> {
.chain(BPF_ALLOWED_FEATURES.iter()) .chain(BPF_ALLOWED_FEATURES.iter())
.chain(CSKY_ALLOWED_FEATURES) .chain(CSKY_ALLOWED_FEATURES)
.chain(LOONGARCH_ALLOWED_FEATURES) .chain(LOONGARCH_ALLOWED_FEATURES)
.chain(IBMZ_ALLOWED_FEATURES)
.cloned() .cloned()
} }
@ -431,6 +439,7 @@ impl super::spec::Target {
"bpf" => BPF_ALLOWED_FEATURES, "bpf" => BPF_ALLOWED_FEATURES,
"csky" => CSKY_ALLOWED_FEATURES, "csky" => CSKY_ALLOWED_FEATURES,
"loongarch64" => LOONGARCH_ALLOWED_FEATURES, "loongarch64" => LOONGARCH_ALLOWED_FEATURES,
"s390x" => IBMZ_ALLOWED_FEATURES,
_ => &[], _ => &[],
} }
} }