mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
Rollup merge of #53179 - gnzlbg:patch-3, r=alexcrichton
Whitelist wasm32 simd128 target feature r? @alexcrichton
This commit is contained in:
commit
7f886cf12b
@ -169,6 +169,10 @@ const MIPS_WHITELIST: &[(&str, Option<&str>)] = &[
|
|||||||
("msa", Some("mips_target_feature")),
|
("msa", Some("mips_target_feature")),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const WASM_WHITELIST: &[(&str, Option<&str>)] = &[
|
||||||
|
("simd128", Some("wasm_target_feature")),
|
||||||
|
];
|
||||||
|
|
||||||
/// 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
|
||||||
/// primtives may be documented.
|
/// primtives may be documented.
|
||||||
///
|
///
|
||||||
@ -181,6 +185,7 @@ pub fn all_known_features() -> impl Iterator<Item=(&'static str, Option<&'static
|
|||||||
.chain(HEXAGON_WHITELIST.iter().cloned())
|
.chain(HEXAGON_WHITELIST.iter().cloned())
|
||||||
.chain(POWERPC_WHITELIST.iter().cloned())
|
.chain(POWERPC_WHITELIST.iter().cloned())
|
||||||
.chain(MIPS_WHITELIST.iter().cloned())
|
.chain(MIPS_WHITELIST.iter().cloned())
|
||||||
|
.chain(WASM_WHITELIST.iter().cloned())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
|
pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
|
||||||
@ -228,6 +233,7 @@ pub fn target_feature_whitelist(sess: &Session)
|
|||||||
"hexagon" => HEXAGON_WHITELIST,
|
"hexagon" => HEXAGON_WHITELIST,
|
||||||
"mips" | "mips64" => MIPS_WHITELIST,
|
"mips" | "mips64" => MIPS_WHITELIST,
|
||||||
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
|
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
|
||||||
|
"wasm32" => WASM_WHITELIST,
|
||||||
_ => &[],
|
_ => &[],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -452,6 +452,7 @@ declare_features! (
|
|||||||
(active, mmx_target_feature, "1.27.0", Some(44839), None),
|
(active, mmx_target_feature, "1.27.0", Some(44839), None),
|
||||||
(active, sse4a_target_feature, "1.27.0", Some(44839), None),
|
(active, sse4a_target_feature, "1.27.0", Some(44839), None),
|
||||||
(active, tbm_target_feature, "1.27.0", Some(44839), None),
|
(active, tbm_target_feature, "1.27.0", Some(44839), None),
|
||||||
|
(active, wasm_target_feature, "1.30.0", Some(44839), None),
|
||||||
|
|
||||||
// Allows macro invocations of the form `#[foo::bar]`
|
// Allows macro invocations of the form `#[foo::bar]`
|
||||||
(active, proc_macro_path_invoc, "1.27.0", Some(38356), None),
|
(active, proc_macro_path_invoc, "1.27.0", Some(38356), None),
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
// gate-test-hexagon_target_feature
|
// gate-test-hexagon_target_feature
|
||||||
// gate-test-mips_target_feature
|
// gate-test-mips_target_feature
|
||||||
// gate-test-mmx_target_feature
|
// gate-test-mmx_target_feature
|
||||||
|
// gate-test-wasm_target_feature
|
||||||
// min-llvm-version 6.0
|
// min-llvm-version 6.0
|
||||||
|
|
||||||
#[target_feature(enable = "avx512bw")]
|
#[target_feature(enable = "avx512bw")]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839)
|
error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839)
|
||||||
--> $DIR/target-feature-gate.rs:28:18
|
--> $DIR/target-feature-gate.rs:29:18
|
||||||
|
|
|
|
||||||
LL | #[target_feature(enable = "avx512bw")]
|
LL | #[target_feature(enable = "avx512bw")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
Loading…
Reference in New Issue
Block a user