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,25 +337,29 @@ main :: proc() {
)
run_cmd(cmd, "")
wasm_debug_flag := opts.debug ? []string{"-g"} : []string{}
run_cmd(
{
"emcc" + EMSCRIPTEN_SHELL_EXT,
"-g",
"-o",
"bin/web/index.html",
"bin/web/game.wasm.o",
"libs/raylib/zig-out-static/lib/libraylib.a",
"libs/physfs/build/libphysfs.a",
"-sUSE_GLFW=3",
"-sWASM_BIGINT",
"-sWARN_ON_UNDEFINED_SYMBOLS=0",
"-sALLOW_MEMORY_GROWTH",
"-sASSERTIONS",
"--shell-file",
"main_web/index_template.html",
"--preload-file",
"assets",
},
temp_concat(
{
"emcc" + EMSCRIPTEN_SHELL_EXT,
"-o",
"bin/web/index.html",
"bin/web/game.wasm.o",
"libs/raylib/zig-out-static/lib/libraylib.a",
"libs/physfs/build/libphysfs.a",
"-sUSE_GLFW=3",
"-sWASM_BIGINT",
"-sWARN_ON_UNDEFINED_SYMBOLS=0",
"-sALLOW_MEMORY_GROWTH",
"-sASSERTIONS",
"--shell-file",
"main_web/index_template.html",
"--preload-file",
"assets",
},
wasm_debug_flag,
),
"",
)
remove_file("./bin/web/game.wasm.o")