godot/platform/windows/platform_windows_builders.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
570 B
Python
Raw Normal View History

"""Functions used to generate source files during build time"""
import os
def make_debug_mingw(target, source, env):
2024-05-08 16:09:50 +08:00
dst = str(target[0])
# Force separate debug symbols if executable size is larger than 1.9 GB.
if env["separate_debug_symbols"] or os.stat(dst).st_size >= 2040109465:
2024-10-12 03:24:00 +08:00
os.system("{0} --only-keep-debug {1} {1}.debugsymbols".format(env["OBJCOPY"], dst))
os.system("{0} --strip-debug --strip-unneeded {1}".format(env["STRIP"], dst))
os.system("{0} --add-gnu-debuglink={1}.debugsymbols {1}".format(env["OBJCOPY"], dst))