Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Enable build IDs for Linux and Windows builds with debug symbols.

Pāvels Nadtočajevs896d8a5924e6
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 4d1dc04818d..f3584cb8ac1 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -212,6 +212,9 @@ def configure(env: "SConsEnvironment"):
env.Append(CCFLAGS=["-ffp-contract=off"])
+ if env["debug_symbols"]:
+ env.Append(LINKFLAGS=["-Wl,--build-id"])
+
if env["library_type"] == "shared_library":
env.Append(CCFLAGS=["-fPIC"])
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index beec49e892f..be339b53e5d 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -780,6 +780,9 @@ def configure_mingw(env: "SConsEnvironment"):
else:
env.Append(LINKFLAGS=["-Wl,--stack," + str(STACK_SIZE)])
+ if env["debug_symbols"]:
+ env.Append(LINKFLAGS=["-Wl,--build-id"])
+
## Compile flags
if not env["use_llvm"]: