Skip to content

Commit 8407612

Browse files
committed
Disable wasm32 features on emscripten
These are only supported by the native wasm32 backend.
1 parent c14bc57 commit 8407612

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_codegen_llvm/llvm_util.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ pub fn target_feature_whitelist(sess: &Session)
243243
"hexagon" => HEXAGON_WHITELIST,
244244
"mips" | "mips64" => MIPS_WHITELIST,
245245
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
246-
"wasm32" => WASM_WHITELIST,
246+
// wasm32 on emscripten does not support these target features
247+
"wasm32" if !sess.target.target.options.is_like_emscripten => WASM_WHITELIST,
247248
_ => &[],
248249
}
249250
}

0 commit comments

Comments
 (0)