Skip to content

Commit

Permalink
Explicitely disable WASM code generation for Emscripten
Browse files Browse the repository at this point in the history
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
  • Loading branch information
badboy committed Jun 28, 2018
1 parent ba196bd commit 8983ff5
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 8983ff5

Please sign in to comment.