Skip to content

Commit

Permalink
Compile WASM as WASM instead of asm.js
Browse files Browse the repository at this point in the history
Looks like the LinkerFlavor change introduced in #40018 accidentally uses GCC for the WebAssembly target, causing Rust to never actually pass the post link args to emscripten. This then causes the code to be compiled as asm.js instead of WebAssembly, because the Binaryen tools never run due to the missing linker argument.
  • Loading branch information
CryZe committed Apr 14, 2017
1 parent 5637ed7 commit ec27aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_back/target/wasm32_unknown_emscripten.rs
Expand Up @@ -14,7 +14,7 @@ use super::emscripten_base::{cmd};

pub fn target() -> Result<Target, String> {
let mut post_link_args = LinkArgs::new();
post_link_args.insert(LinkerFlavor::Gcc,
post_link_args.insert(LinkerFlavor::Em,
vec!["-s".to_string(),
"BINARYEN=1".to_string(),
"-s".to_string(),
Expand Down

0 comments on commit ec27aa9

Please sign in to comment.