mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-06 06:10:06 +03:00
Fix debug symbols logic on platform=web to match Godot core.
This commit is contained in:
@@ -2,6 +2,10 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
def using_emcc(env):
|
||||||
|
return "emcc" in os.path.basename(env["CC"])
|
||||||
|
|
||||||
|
|
||||||
def using_clang(env):
|
def using_clang(env):
|
||||||
return "clang" in os.path.basename(env["CC"])
|
return "clang" in os.path.basename(env["CC"])
|
||||||
|
|
||||||
@@ -89,7 +93,13 @@ def generate(env):
|
|||||||
# Adding dwarf-4 explicitly makes stacktraces work with clang builds,
|
# Adding dwarf-4 explicitly makes stacktraces work with clang builds,
|
||||||
# otherwise addr2line doesn't understand them.
|
# otherwise addr2line doesn't understand them.
|
||||||
env.Append(CCFLAGS=["-gdwarf-4"])
|
env.Append(CCFLAGS=["-gdwarf-4"])
|
||||||
if env.dev_build:
|
if using_emcc(env):
|
||||||
|
# Emscripten only produces dwarf symbols when using "-g3".
|
||||||
|
env.AppendUnique(CCFLAGS=["-g3"])
|
||||||
|
# Emscripten linker needs debug symbols options too.
|
||||||
|
env.AppendUnique(LINKFLAGS=["-gdwarf-4"])
|
||||||
|
env.AppendUnique(LINKFLAGS=["-g3"])
|
||||||
|
elif env.dev_build:
|
||||||
env.Append(CCFLAGS=["-g3"])
|
env.Append(CCFLAGS=["-g3"])
|
||||||
else:
|
else:
|
||||||
env.Append(CCFLAGS=["-g2"])
|
env.Append(CCFLAGS=["-g2"])
|
||||||
|
|||||||
Reference in New Issue
Block a user