Conditionally pass debug flag to emcc

This commit is contained in:
sergeypdev 2025-05-28 11:41:47 +04:00
parent 328dac0617
commit c83e6831ea

View File

@ -337,10 +337,12 @@ main :: proc() {
)
run_cmd(cmd, "")
wasm_debug_flag := opts.debug ? []string{"-g"} : []string{}
run_cmd(
temp_concat(
{
"emcc" + EMSCRIPTEN_SHELL_EXT,
"-g",
"-o",
"bin/web/index.html",
"bin/web/game.wasm.o",
@ -356,6 +358,8 @@ main :: proc() {
"--preload-file",
"assets",
},
wasm_debug_flag,
),
"",
)
remove_file("./bin/web/game.wasm.o")