diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-05-10 17:30:56 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-07-10 14:18:57 +0200 |
commit | 3d553eccdff0794a871384085985fb65ee8a092d (patch) | |
tree | e33e5d115ea6c4d81fb9838c58974a39a4217abb /SConstruct | |
parent | 26d1577f3985363faab48a65e9a0d9eed0e26d86 (diff) | |
download | redot-engine-3d553eccdff0794a871384085985fb65ee8a092d.tar.gz |
[Web] Fix debug symbols in web builds
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 8e9a536bdc..cf6d46855c 100644 --- a/SConstruct +++ b/SConstruct @@ -716,7 +716,13 @@ else: # Adding dwarf-4 explicitly makes stacktraces work with clang builds, # otherwise addr2line doesn't understand them env.Append(CCFLAGS=["-gdwarf-4"]) - if env.dev_build: + if methods.using_emcc(env): + # Emscripten only produces dwarf symbols when using "-g3". + env.Append(CCFLAGS=["-g3"]) + # Emscripten linker needs debug symbols options too. + env.Append(LINKFLAGS=["-gdwarf-4"]) + env.Append(LINKFLAGS=["-g3"]) + elif env.dev_build: env.Append(CCFLAGS=["-g3"]) else: env.Append(CCFLAGS=["-g2"]) |