Skip to content

Commit 6a3e322

Browse files
committed
Pass debugging arguments to emcc
Tells emcc to enable assertions and debugging information for wasm32-experimental-emscripten. This makes the codegen issues caused by LLVM bug 33824 manifest more frequently at runtime and improves the wasm debugging experience.
1 parent 344f01c commit 6a3e322

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_back/target/wasm32_experimental_emscripten.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ pub fn target() -> Result<Target, String> {
1818
vec!["-s".to_string(),
1919
"WASM=1".to_string(),
2020
"-s".to_string(),
21-
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string()]);
21+
"ASSERTIONS=1".to_string(),
22+
"-s".to_string(),
23+
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
24+
"-g3".to_string()]);
2225

2326
let opts = TargetOptions {
2427
linker: cmd("emcc"),

0 commit comments

Comments
 (0)