Skip to content

Commit 5ce865e

Browse files
authored
Add wasm32 simd128 target feature
1 parent e90dc6f commit 5ce865e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc_codegen_llvm/llvm_util.rs

+6
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ const MIPS_WHITELIST: &[(&str, Option<&str>)] = &[
169169
("msa", Some("mips_target_feature")),
170170
];
171171

172+
const WASM_WHITELIST: &[(&str, Option<&str>)] = &[
173+
("simd128", Some("wasm_target_feature")),
174+
];
175+
172176
/// When rustdoc is running, provide a list of all known features so that all their respective
173177
/// primtives may be documented.
174178
///
@@ -181,6 +185,7 @@ pub fn all_known_features() -> impl Iterator<Item=(&'static str, Option<&'static
181185
.chain(HEXAGON_WHITELIST.iter().cloned())
182186
.chain(POWERPC_WHITELIST.iter().cloned())
183187
.chain(MIPS_WHITELIST.iter().cloned())
188+
.chain(WASM_WHITELIST.iter().cloned())
184189
}
185190

186191
pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
@@ -228,6 +233,7 @@ pub fn target_feature_whitelist(sess: &Session)
228233
"hexagon" => HEXAGON_WHITELIST,
229234
"mips" | "mips64" => MIPS_WHITELIST,
230235
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
236+
"wasm32" => WASM_WHITELIST,
231237
_ => &[],
232238
}
233239
}

0 commit comments

Comments
 (0)