From 8983ff522691249f1c38e36cb56c6b9a9e5348b1 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 28 Jun 2018 12:24:14 +0200 Subject: [PATCH] Explicitely disable WASM code generation for Emscripten Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/ChangeLog.markdown#v1381-05172018 It now defaults to WebAssembly and requires an explicit flag to generate asm.js. WASM=0 is also valid for older emcc and thus doesn't break it. Closes #51856 --- src/librustc_target/spec/asmjs_unknown_emscripten.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc_target/spec/asmjs_unknown_emscripten.rs b/src/librustc_target/spec/asmjs_unknown_emscripten.rs index e2cf714f0ead3..4e716fb207fab 100644 --- a/src/librustc_target/spec/asmjs_unknown_emscripten.rs +++ b/src/librustc_target/spec/asmjs_unknown_emscripten.rs @@ -16,7 +16,9 @@ pub fn target() -> Result { vec!["-s".to_string(), "ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(), "-s".to_string(), - "ABORTING_MALLOC=0".to_string()]); + "ABORTING_MALLOC=0".to_string(), + "-s".to_string(), + "WASM=0".to_string()]); let opts = TargetOptions { dynamic_linking: false,