Skip to content

Commit

Permalink
Rollup merge of rust-lang#41303 - CryZe:patch-5, r=japaric
Browse files Browse the repository at this point in the history
Compile WASM as WASM instead of asm.js

Looks like the LinkerFlavor change introduced in rust-lang#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
frewsxcv authored Apr 14, 2017
2 parents 5aa9602 + ec27aa9 commit 13dc855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_back/target/wasm32_unknown_emscripten.rs
Original file line number Diff line number Diff line change
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 13dc855

Please sign in to comment.