Skip to content

Commit 8983ff5

Browse files
committedJun 28, 2018
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
1 parent ba196bd commit 8983ff5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/librustc_target/spec/asmjs_unknown_emscripten.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ pub fn target() -> Result<Target, String> {
1616
vec!["-s".to_string(),
1717
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
1818
"-s".to_string(),
19-
"ABORTING_MALLOC=0".to_string()]);
19+
"ABORTING_MALLOC=0".to_string(),
20+
"-s".to_string(),
21+
"WASM=0".to_string()]);
2022

2123
let opts = TargetOptions {
2224
dynamic_linking: false,

0 commit comments

Comments
 (0)
Please sign in to comment.