From 8407612a8d0fa3195fe7d3785be02790979ddf92 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 8 Nov 2018 16:22:20 +0100 Subject: [PATCH] Disable wasm32 features on emscripten These are only supported by the native wasm32 backend. --- src/librustc_codegen_llvm/llvm_util.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index 0a80fdddbf9f..0e8fb1c28a30 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -243,7 +243,8 @@ pub fn target_feature_whitelist(sess: &Session) "hexagon" => HEXAGON_WHITELIST, "mips" | "mips64" => MIPS_WHITELIST, "powerpc" | "powerpc64" => POWERPC_WHITELIST, - "wasm32" => WASM_WHITELIST, + // wasm32 on emscripten does not support these target features + "wasm32" if !sess.target.target.options.is_like_emscripten => WASM_WHITELIST, _ => &[], } }