Skip to content

Commit

Permalink
Rollup merge of #51875 - badboy:emscripten-no-wasm, r=nikomatsakis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mark-Simulacrum authored Jun 28, 2018
2 parents 7c0dd79 + 8983ff5 commit 3332c0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_target/spec/asmjs_unknown_emscripten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ pub fn target() -> Result<Target, String> {
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,
Expand Down

0 comments on commit 3332c0c

Please sign in to comment.