Skip to content

Commit 13dc855

Browse files
authored
Rollup merge of #41303 - CryZe:patch-5, r=japaric
Compile WASM as WASM instead of asm.js 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.
2 parents 5aa9602 + ec27aa9 commit 13dc855

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_back/target/wasm32_unknown_emscripten.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use super::emscripten_base::{cmd};
1414

1515
pub fn target() -> Result<Target, String> {
1616
let mut post_link_args = LinkArgs::new();
17-
post_link_args.insert(LinkerFlavor::Gcc,
17+
post_link_args.insert(LinkerFlavor::Em,
1818
vec!["-s".to_string(),
1919
"BINARYEN=1".to_string(),
2020
"-s".to_string(),

0 commit comments

Comments
 (0)