From 2782802f70d43bd8a2c2a2c0f7085a2a3166e320 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Sep 2025 19:51:25 +0200 Subject: [PATCH 01/33] Introduce `separate_debug_symbols` option, separate symbols on macOS & iOS --- SConstruct | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/SConstruct b/SConstruct index b7ece2d2..dc97f947 100644 --- a/SConstruct +++ b/SConstruct @@ -59,6 +59,7 @@ def add_custom_bool_option(name, description, default=False): # Define our custom options add_custom_bool_option("generate_ios_framework", "Generate iOS xcframework from static libraries", False) add_custom_bool_option("build_android_lib", "Build Android bridge library", False) +add_custom_bool_option("separate_debug_symbols", "Separate debug symbols (supported: macOS)", True) # Workaround: Remove custom options from ARGUMENTS to avoid warnings from godot-cpp. # Godot complains about variables it does not recognize. See: https://github.com/godotengine/godot-cpp/issues/1334 @@ -262,6 +263,26 @@ if env.get("build_android_lib", False): Depends(android_lib, library) +# *** Separate debug symbols + +def separate_debug_symbols(target, source, env): + if platform in ["macos", "ios"]: + target_path = str(target[0]) + target_name = os.path.basename(target_path) + if target_name.endswith(".dylib"): + target_name = os.path.splitext(target_name)[0] + dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" + os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"") + os.system(f"strip -u -r \"{target_path}\"") + +if env.get("separate_debug_symbols", True): + from SCons.Script import Action + if platform == "ios": + env.AddPostAction(device_lib, Action(separate_debug_symbols)) + env.AddPostAction(simulator_lib, Action(separate_debug_symbols)) + elif platform == "macos": + env.AddPostAction(library, Action(separate_debug_symbols)) + # *** Add help for optional targets. Help(""" From 6a3580a5b5aa31b82907d193d298a9e912ca6b09 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Sep 2025 20:13:42 +0200 Subject: [PATCH 02/33] Simplify separation code, update help --- SConstruct | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index dc97f947..1764dbb2 100644 --- a/SConstruct +++ b/SConstruct @@ -59,7 +59,7 @@ def add_custom_bool_option(name, description, default=False): # Define our custom options add_custom_bool_option("generate_ios_framework", "Generate iOS xcframework from static libraries", False) add_custom_bool_option("build_android_lib", "Build Android bridge library", False) -add_custom_bool_option("separate_debug_symbols", "Separate debug symbols (supported: macOS)", True) +add_custom_bool_option("separate_debug_symbols", "Separate debug symbols (supported on macOS, iOS)", True) # Workaround: Remove custom options from ARGUMENTS to avoid warnings from godot-cpp. # Godot complains about variables it does not recognize. See: https://github.com/godotengine/godot-cpp/issues/1334 @@ -277,10 +277,7 @@ def separate_debug_symbols(target, source, env): if env.get("separate_debug_symbols", True): from SCons.Script import Action - if platform == "ios": - env.AddPostAction(device_lib, Action(separate_debug_symbols)) - env.AddPostAction(simulator_lib, Action(separate_debug_symbols)) - elif platform == "macos": + if platform in ["macos", "ios"]: env.AddPostAction(library, Action(separate_debug_symbols)) # *** Add help for optional targets. From 4811f4fe264dfdd8caa13f0916db8e67545290f7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Sep 2025 20:52:37 +0200 Subject: [PATCH 03/33] Add error handling --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 1764dbb2..6142ccf1 100644 --- a/SConstruct +++ b/SConstruct @@ -272,8 +272,14 @@ def separate_debug_symbols(target, source, env): if target_name.endswith(".dylib"): target_name = os.path.splitext(target_name)[0] dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" - os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"") - os.system(f"strip -u -r \"{target_path}\"") + err = os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"") + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + err = os.system(f"strip -u -r \"{target_path}\"") + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) if env.get("separate_debug_symbols", True): from SCons.Script import Action From a770906b05e57dbed4c599cfcb515203b4d4a768 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Sep 2025 21:09:29 +0200 Subject: [PATCH 04/33] Whitespace --- SConstruct | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SConstruct b/SConstruct index 6142ccf1..15a23ab4 100644 --- a/SConstruct +++ b/SConstruct @@ -272,10 +272,12 @@ def separate_debug_symbols(target, source, env): if target_name.endswith(".dylib"): target_name = os.path.splitext(target_name)[0] dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" + err = os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"") if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") Exit(1) + err = os.system(f"strip -u -r \"{target_path}\"") if err != 0: print(f"ERROR: Failed to strip debug symbols (exit code {err})") From d18846e2fe1e481f629b22fa3352f894eaeae2b7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 11:05:59 +0200 Subject: [PATCH 05/33] Add support for splitting symbols on Linux --- SConstruct | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 15a23ab4..2f32db8c 100644 --- a/SConstruct +++ b/SConstruct @@ -266,26 +266,43 @@ if env.get("build_android_lib", False): # *** Separate debug symbols def separate_debug_symbols(target, source, env): + target_path = str(target[0]) + if platform in ["macos", "ios"]: - target_path = str(target[0]) target_name = os.path.basename(target_path) if target_name.endswith(".dylib"): target_name = os.path.splitext(target_name)[0] dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" - err = os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"") + err = os.system(f'dsymutil "{target_path}" -o "{dsym_path}"') + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + + err = os.system(f'strip -u -r "{target_path}"') + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) + elif platform == "linux": + debug_path = f"{target_path}.debug" + err = os.system(f'objcopy --only-keep-debug --compress-debug-sections=zstd "{target_path}" "{debug_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") Exit(1) - err = os.system(f"strip -u -r \"{target_path}\"") + err = os.system(f'strip --strip-debug --strip-unneeded "{target_path}"') if err != 0: print(f"ERROR: Failed to strip debug symbols (exit code {err})") Exit(1) + err = os.system(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') + if err != 0: + print(f"ERROR: Failed to add debug link (exit code {err})") + Exit(1) + if env.get("separate_debug_symbols", True): from SCons.Script import Action - if platform in ["macos", "ios"]: + if platform in ["macos", "ios", "linux"]: env.AddPostAction(library, Action(separate_debug_symbols)) # *** Add help for optional targets. From e12fc36f6db06ebcad975409b32e13ef91d6ed29 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 11:25:16 +0200 Subject: [PATCH 06/33] Decode error code with WEXITSTATUS --- SConstruct | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 2f32db8c..6147c8e6 100644 --- a/SConstruct +++ b/SConstruct @@ -268,34 +268,38 @@ if env.get("build_android_lib", False): def separate_debug_symbols(target, source, env): target_path = str(target[0]) + def run(cmd): + err = os.system(cmd) + return os.WEXITSTATUS(err) + if platform in ["macos", "ios"]: target_name = os.path.basename(target_path) if target_name.endswith(".dylib"): target_name = os.path.splitext(target_name)[0] dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" - err = os.system(f'dsymutil "{target_path}" -o "{dsym_path}"') + err = run(f'dsymutil "{target_path}" -o "{dsym_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") Exit(1) - err = os.system(f'strip -u -r "{target_path}"') + err = run(f'strip -u -r "{target_path}"') if err != 0: print(f"ERROR: Failed to strip debug symbols (exit code {err})") Exit(1) elif platform == "linux": debug_path = f"{target_path}.debug" - err = os.system(f'objcopy --only-keep-debug --compress-debug-sections=zstd "{target_path}" "{debug_path}"') + err = run(f'objcopy --only-keep-debug --compress-debug-sections=zstd "{target_path}" "{debug_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") Exit(1) - err = os.system(f'strip --strip-debug --strip-unneeded "{target_path}"') + err = run(f'strip --strip-debug --strip-unneeded "{target_path}"') if err != 0: print(f"ERROR: Failed to strip debug symbols (exit code {err})") Exit(1) - err = os.system(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') + err = run(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') if err != 0: print(f"ERROR: Failed to add debug link (exit code {err})") Exit(1) From 4e4e202bb00a8e05a22b75f68185be113817f48e Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 11:25:25 +0200 Subject: [PATCH 07/33] Use zlib --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 6147c8e6..2d383544 100644 --- a/SConstruct +++ b/SConstruct @@ -289,7 +289,7 @@ def separate_debug_symbols(target, source, env): Exit(1) elif platform == "linux": debug_path = f"{target_path}.debug" - err = run(f'objcopy --only-keep-debug --compress-debug-sections=zstd "{target_path}" "{debug_path}"') + err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{target_path}" "{debug_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") Exit(1) From 5bf28f08b9f382a83b73cd5bf197601e10b75126 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 11:27:26 +0200 Subject: [PATCH 08/33] Whitespace --- SConstruct | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SConstruct b/SConstruct index 2d383544..7de10610 100644 --- a/SConstruct +++ b/SConstruct @@ -235,6 +235,7 @@ else: ) Default(library) + # *** Build Android lib if sys.platform.startswith("win"): @@ -289,6 +290,7 @@ def separate_debug_symbols(target, source, env): Exit(1) elif platform == "linux": debug_path = f"{target_path}.debug" + err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{target_path}" "{debug_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") @@ -309,6 +311,7 @@ if env.get("separate_debug_symbols", True): if platform in ["macos", "ios", "linux"]: env.AddPostAction(library, Action(separate_debug_symbols)) + # *** Add help for optional targets. Help(""" From 18aaa096cc9b38c62255560f1b6f1f664943a402 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 12:03:29 +0200 Subject: [PATCH 09/33] Remove splitting symbols step as it is handled by the build system --- .github/workflows/build_gdextension.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/build_gdextension.yml b/.github/workflows/build_gdextension.yml index e3f37b50..080667a9 100644 --- a/.github/workflows/build_gdextension.yml +++ b/.github/workflows/build_gdextension.yml @@ -291,22 +291,6 @@ jobs: run: | scons platform=${{matrix.platform}} target=${{matrix.target}} arch=${{matrix.arch}} ${{matrix.scons-flags}} - - name: Separate debug symbols on Linux - if: matrix.platform == 'linux' - env: - BUILD_TYPE: ${{matrix.target == 'template_release' && 'release' || 'debug'}} - shell: bash - run: | - if [ -d "project/addons/sentry/bin/linux/${{matrix.arch}}" ]; then - cd project/addons/sentry/bin/linux/${{matrix.arch}} - else - cd project/addons/sentry/bin/noop - fi - lib=libsentry.${{matrix.platform}}.${BUILD_TYPE}.${{matrix.arch}}.so - objcopy --only-keep-debug ${lib} ${lib}.debug - objcopy --add-gnu-debuglink ${lib}.debug ${lib} - strip --strip-debug ${lib} - - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 32d23095029c046effb08743d946239bc5f1a964 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 12:06:27 +0200 Subject: [PATCH 10/33] Split symbols for crashpad_handler --- SConstruct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 7de10610..4824d0d5 100644 --- a/SConstruct +++ b/SConstruct @@ -59,7 +59,7 @@ def add_custom_bool_option(name, description, default=False): # Define our custom options add_custom_bool_option("generate_ios_framework", "Generate iOS xcframework from static libraries", False) add_custom_bool_option("build_android_lib", "Build Android bridge library", False) -add_custom_bool_option("separate_debug_symbols", "Separate debug symbols (supported on macOS, iOS)", True) +add_custom_bool_option("separate_debug_symbols", "Separate debug symbols (supported on macOS, iOS, Linux)", True) # Workaround: Remove custom options from ARGUMENTS to avoid warnings from godot-cpp. # Godot complains about variables it does not recognize. See: https://github.com/godotengine/godot-cpp/issues/1334 @@ -308,8 +308,11 @@ def separate_debug_symbols(target, source, env): if env.get("separate_debug_symbols", True): from SCons.Script import Action - if platform in ["macos", "ios", "linux"]: + if platform in ["macos", "ios"]: + env.AddPostAction(library, Action(separate_debug_symbols)) + if platform == "linux": env.AddPostAction(library, Action(separate_debug_symbols)) + env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) # *** Add help for optional targets. From 3240475e1d2ca4c0c3f2fe4a39ca57b3816c13f7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 12:31:00 +0200 Subject: [PATCH 11/33] Move debug symbol separation logic to utils module --- SConstruct | 64 +++++++++------------------------------------ site_scons/utils.py | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 51 deletions(-) create mode 100644 site_scons/utils.py diff --git a/SConstruct b/SConstruct index 4824d0d5..1124b31f 100644 --- a/SConstruct +++ b/SConstruct @@ -3,6 +3,8 @@ import os import subprocess import sys from enum import Enum +from utils import separate_debug_symbols +from SCons.Script import Action # *** Settings. @@ -121,6 +123,7 @@ elif internal_sdk == SDK.NATIVE: # Separate arch dirs to avoid crashpad handler filename conflicts. out_dir += "/" + arch out_dir = Dir(out_dir) +env['out_dir'] = out_dir # *** Build sentry-native. @@ -132,6 +135,9 @@ if internal_sdk == SDK.NATIVE: deploy_crashpad_handler = env.CopyCrashpadHandler(out_dir) Default(deploy_crashpad_handler) + if env['separate_debug_symbols']: + env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) + # *** Utilize sentry-cocoa. @@ -236,6 +242,13 @@ else: Default(library) +# *** Separate GDExtension debug symbols + +if env.get("separate_debug_symbols", True): + if platform in ["macos", "ios", "linux"]: + env.AddPostAction(library, Action(separate_debug_symbols)) + + # *** Build Android lib if sys.platform.startswith("win"): @@ -264,57 +277,6 @@ if env.get("build_android_lib", False): Depends(android_lib, library) -# *** Separate debug symbols - -def separate_debug_symbols(target, source, env): - target_path = str(target[0]) - - def run(cmd): - err = os.system(cmd) - return os.WEXITSTATUS(err) - - if platform in ["macos", "ios"]: - target_name = os.path.basename(target_path) - if target_name.endswith(".dylib"): - target_name = os.path.splitext(target_name)[0] - dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" - - err = run(f'dsymutil "{target_path}" -o "{dsym_path}"') - if err != 0: - print(f"ERROR: Failed to split debug symbols (exit code {err})") - Exit(1) - - err = run(f'strip -u -r "{target_path}"') - if err != 0: - print(f"ERROR: Failed to strip debug symbols (exit code {err})") - Exit(1) - elif platform == "linux": - debug_path = f"{target_path}.debug" - - err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{target_path}" "{debug_path}"') - if err != 0: - print(f"ERROR: Failed to split debug symbols (exit code {err})") - Exit(1) - - err = run(f'strip --strip-debug --strip-unneeded "{target_path}"') - if err != 0: - print(f"ERROR: Failed to strip debug symbols (exit code {err})") - Exit(1) - - err = run(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') - if err != 0: - print(f"ERROR: Failed to add debug link (exit code {err})") - Exit(1) - -if env.get("separate_debug_symbols", True): - from SCons.Script import Action - if platform in ["macos", "ios"]: - env.AddPostAction(library, Action(separate_debug_symbols)) - if platform == "linux": - env.AddPostAction(library, Action(separate_debug_symbols)) - env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) - - # *** Add help for optional targets. Help(""" diff --git a/site_scons/utils.py b/site_scons/utils.py new file mode 100644 index 00000000..d8f77f2b --- /dev/null +++ b/site_scons/utils.py @@ -0,0 +1,47 @@ +""" +Reusable utility and action functions +""" + +import os + +def separate_debug_symbols(target, source, env): + target_path = str(target[0]) + platform = env['platform'] + out_dir = env['out_dir'] + + def run(cmd): + err = os.system(cmd) + return os.WEXITSTATUS(err) + + if platform in ["macos", "ios"]: + target_name = os.path.basename(target_path) + if target_name.endswith(".dylib"): + target_name = os.path.splitext(target_name)[0] + dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" + + err = run(f'dsymutil "{target_path}" -o "{dsym_path}"') + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + + err = run(f'strip -u -r "{target_path}"') + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) + elif platform == "linux": + debug_path = f"{target_path}.debug" + + err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{target_path}" "{debug_path}"') + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + + err = run(f'strip --strip-debug --strip-unneeded "{target_path}"') + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) + + err = run(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') + if err != 0: + print(f"ERROR: Failed to add debug link (exit code {err})") + Exit(1) From 9ebe48d0abe0b5fc6a8b7f2b9ec775f47fc0b617 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 12:40:20 +0200 Subject: [PATCH 12/33] Clean up debug symbol handling and build options --- SConstruct | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 1124b31f..9d34a62e 100644 --- a/SConstruct +++ b/SConstruct @@ -135,7 +135,7 @@ if internal_sdk == SDK.NATIVE: deploy_crashpad_handler = env.CopyCrashpadHandler(out_dir) Default(deploy_crashpad_handler) - if env['separate_debug_symbols']: + if env['separate_debug_symbols'] and platform == "linux": env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) @@ -215,7 +215,7 @@ if platform == "ios": ) Alias("ios_framework", ios_framework) - if env.get("generate_ios_framework", False): + if env["generate_ios_framework"]: env.Depends(ios_framework, library) Default(ios_framework) @@ -244,7 +244,7 @@ else: # *** Separate GDExtension debug symbols -if env.get("separate_debug_symbols", True): +if env["separate_debug_symbols"]: if platform in ["macos", "ios", "linux"]: env.AddPostAction(library, Action(separate_debug_symbols)) @@ -272,7 +272,7 @@ env_gradle.AlwaysBuild(android_lib) Alias("android_lib", android_lib) -if env.get("build_android_lib", False): +if env["build_android_lib"]: Default(android_lib) Depends(android_lib, library) From 569b4f76d2f287a41a14e0e0f7bf363474cc3a49 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 13:11:59 +0200 Subject: [PATCH 13/33] Style fix --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 9d34a62e..47e9523d 100644 --- a/SConstruct +++ b/SConstruct @@ -135,7 +135,7 @@ if internal_sdk == SDK.NATIVE: deploy_crashpad_handler = env.CopyCrashpadHandler(out_dir) Default(deploy_crashpad_handler) - if env['separate_debug_symbols'] and platform == "linux": + if env["separate_debug_symbols"] and platform == "linux": env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) From d93bd8c44af072eb4062007b6a9581c525a9f6bb Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:16:23 +0200 Subject: [PATCH 14/33] Add SCons tool for debug symbol separation --- SConstruct | 7 +- .../site_tools/separate_debug_symbols.py | 81 +++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 site_scons/site_tools/separate_debug_symbols.py diff --git a/SConstruct b/SConstruct index 47e9523d..be95b4ff 100644 --- a/SConstruct +++ b/SConstruct @@ -79,6 +79,9 @@ env = SConscript("modules/godot-cpp/SConstruct") platform = env["platform"] arch = env["arch"] +# Register tools +env.Tool("separate_debug_symbols") + # Restore original ARGUMENTS and add custom options to environment ARGUMENTS.clear() ARGUMENTS.update(original_arguments) @@ -245,8 +248,10 @@ else: # *** Separate GDExtension debug symbols if env["separate_debug_symbols"]: + # Note: Windows/MSVC separates by default. if platform in ["macos", "ios", "linux"]: - env.AddPostAction(library, Action(separate_debug_symbols)) + separate_symbols = env.SeparateDebugSymbols(library) + Default(separate_symbols) # *** Build Android lib diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py new file mode 100644 index 00000000..e7790e0f --- /dev/null +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -0,0 +1,81 @@ +""" +Tool to separate debug symbols. +""" + +from SCons.Script import Builder, Copy, Dir, Clean +import os.path + + +def get_symbols_path(env, source): + source_path = str(source[0]) + platform = env['platform'] + out_dir = env['out_dir'] + + if platform in ["macos", "ios"]: + source_name = os.path.basename(source_path) + if source_name.endswith(".dylib"): + source_name = os.path.splitext(source_name)[0] + return Dir(f"{out_dir}/dSYMs/{source_name}.dSYM") + elif platform == "linux": + return File(f"{source_path}.debug") + return "" + + +def separate_debug_symbols(target, source, env): + platform = env['platform'] + out_dir = env['out_dir'] + + target_path = str(target[0]) + source_path = str(source[0]) + + def run(cmd): + err = os.system(cmd) + return os.WEXITSTATUS(err) + + if platform in ["macos", "ios"]: + err = run(f'dsymutil "{source_path}" -o "{target_path}"') + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + + err = run(f'strip -u -r "{source_path}"') + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) + elif platform == "linux": + debug_path = f"{source_path}.debug" + + err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{source_path}" "{target_path}"') + if err != 0: + print(f"ERROR: Failed to split debug symbols (exit code {err})") + Exit(1) + + err = run(f'strip --strip-debug --strip-unneeded "{source_path}"') + if err != 0: + print(f"ERROR: Failed to strip debug symbols (exit code {err})") + Exit(1) + + err = run(f'objcopy --add-gnu-debuglink="{target_path}" "{source_path}"') + if err != 0: + print(f"ERROR: Failed to add debug link (exit code {err})") + Exit(1) + + +def command(env, source): + symbols_path = get_symbols_path(env, source) + result = env.Command( + symbols_path, + source, + separate_debug_symbols, + cmdstr = "Separate debug symbols" + ) + Clean(symbols_path, symbols_path) + return result + + +def generate(env): + env.AddMethod(command, "SeparateDebugSymbols") + + +def exists(env): + return True From 899dc1096d85065dde2c024cc2f8f83c8eb3a386 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:17:49 +0200 Subject: [PATCH 15/33] Delete utils.py --- site_scons/utils.py | 47 --------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 site_scons/utils.py diff --git a/site_scons/utils.py b/site_scons/utils.py deleted file mode 100644 index d8f77f2b..00000000 --- a/site_scons/utils.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Reusable utility and action functions -""" - -import os - -def separate_debug_symbols(target, source, env): - target_path = str(target[0]) - platform = env['platform'] - out_dir = env['out_dir'] - - def run(cmd): - err = os.system(cmd) - return os.WEXITSTATUS(err) - - if platform in ["macos", "ios"]: - target_name = os.path.basename(target_path) - if target_name.endswith(".dylib"): - target_name = os.path.splitext(target_name)[0] - dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM" - - err = run(f'dsymutil "{target_path}" -o "{dsym_path}"') - if err != 0: - print(f"ERROR: Failed to split debug symbols (exit code {err})") - Exit(1) - - err = run(f'strip -u -r "{target_path}"') - if err != 0: - print(f"ERROR: Failed to strip debug symbols (exit code {err})") - Exit(1) - elif platform == "linux": - debug_path = f"{target_path}.debug" - - err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{target_path}" "{debug_path}"') - if err != 0: - print(f"ERROR: Failed to split debug symbols (exit code {err})") - Exit(1) - - err = run(f'strip --strip-debug --strip-unneeded "{target_path}"') - if err != 0: - print(f"ERROR: Failed to strip debug symbols (exit code {err})") - Exit(1) - - err = run(f'objcopy --add-gnu-debuglink="{debug_path}" "{target_path}"') - if err != 0: - print(f"ERROR: Failed to add debug link (exit code {err})") - Exit(1) From af02a7b52f4888e25b9f1e3792118de7a6fdb2c3 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:20:30 +0200 Subject: [PATCH 16/33] Clean up --- SConstruct | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index be95b4ff..42f71763 100644 --- a/SConstruct +++ b/SConstruct @@ -3,8 +3,6 @@ import os import subprocess import sys from enum import Enum -from utils import separate_debug_symbols -from SCons.Script import Action # *** Settings. @@ -139,7 +137,7 @@ if internal_sdk == SDK.NATIVE: Default(deploy_crashpad_handler) if env["separate_debug_symbols"] and platform == "linux": - env.AddPostAction(deploy_crashpad_handler, Action(separate_debug_symbols)) + Default(env.SeparateDebugSymbols(deploy_crashpad_handler)) # *** Utilize sentry-cocoa. From 44111e50a806d983bb79b03d8e2adaeec3996f91 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:23:36 +0200 Subject: [PATCH 17/33] Missing imports --- site_scons/site_tools/separate_debug_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index e7790e0f..a837a185 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -2,7 +2,7 @@ Tool to separate debug symbols. """ -from SCons.Script import Builder, Copy, Dir, Clean +from SCons.Script import Builder, Copy, Dir, File Clean, Exit import os.path From 205d21b51ee13dac370913b731de27f4c2a1bf7d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:26:34 +0200 Subject: [PATCH 18/33] Fix syntax error --- site_scons/site_tools/separate_debug_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index a837a185..b9eda967 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -2,7 +2,7 @@ Tool to separate debug symbols. """ -from SCons.Script import Builder, Copy, Dir, File Clean, Exit +from SCons.Script import Builder, Copy, Dir, File, Clean, Exit import os.path From 1311518b3e3613944e59e8e48055bf8540c8295b Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:27:48 +0200 Subject: [PATCH 19/33] Remove unused import --- site_scons/site_tools/separate_debug_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index b9eda967..bad76ba8 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -2,7 +2,7 @@ Tool to separate debug symbols. """ -from SCons.Script import Builder, Copy, Dir, File, Clean, Exit +from SCons.Script import Builder, Dir, File, Clean, Exit import os.path From af21a46011361a8e9a1645cbdbba2646c547cf4c Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 20:38:32 +0200 Subject: [PATCH 20/33] Add meaningful message --- site_scons/site_tools/separate_debug_symbols.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index bad76ba8..e6b5619e 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -2,7 +2,7 @@ Tool to separate debug symbols. """ -from SCons.Script import Builder, Dir, File, Clean, Exit +from SCons.Script import Builder, Dir, File, Clean, Exit, Action import os.path @@ -66,8 +66,7 @@ def command(env, source): result = env.Command( symbols_path, source, - separate_debug_symbols, - cmdstr = "Separate debug symbols" + Action(separate_debug_symbols, cmdstr="Separating debug symbols: $SOURCE -> $TARGET") ) Clean(symbols_path, symbols_path) return result From 594def68fe849da7e4f9b51f481d3096a6c48ede Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 21:05:10 +0200 Subject: [PATCH 21/33] Decouple separate symbols tool from paths --- SConstruct | 17 ++++++++++--- .../site_tools/separate_debug_symbols.py | 25 +++++-------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/SConstruct b/SConstruct index 42f71763..33fd640c 100644 --- a/SConstruct +++ b/SConstruct @@ -137,7 +137,9 @@ if internal_sdk == SDK.NATIVE: Default(deploy_crashpad_handler) if env["separate_debug_symbols"] and platform == "linux": - Default(env.SeparateDebugSymbols(deploy_crashpad_handler)) + handler_path = str(deploy_crashpad_handler[0]) + symbols_path = f"{handler_path}.debug" + Default(env.SeparateDebugSymbols(File(symbols_path), File(handler_path))) # *** Utilize sentry-cocoa. @@ -247,8 +249,17 @@ else: if env["separate_debug_symbols"]: # Note: Windows/MSVC separates by default. - if platform in ["macos", "ios", "linux"]: - separate_symbols = env.SeparateDebugSymbols(library) + lib_path = str(library[0]) + if platform in ["macos", "ios"]: + lib_name = os.path.basename(lib_path) + if lib_name.endswith(".dylib"): + lib_name = os.path.splitext(lib_name)[0] + dsym_path = f"{out_dir}/dSYMs/{lib_name}.dSYM" + separate_symbols = env.SeparateDebugSymbols(Dir(dsym_path), File(lib_path)) + Default(separate_symbols) + elif platform == "linux": + symbols_path = f"{lib_path}.debug" + separate_symbols = env.SeparateDebugSymbols(File(symbols_path), File(lib_path)) Default(separate_symbols) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index e6b5619e..a6b9913f 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -6,21 +6,6 @@ import os.path -def get_symbols_path(env, source): - source_path = str(source[0]) - platform = env['platform'] - out_dir = env['out_dir'] - - if platform in ["macos", "ios"]: - source_name = os.path.basename(source_path) - if source_name.endswith(".dylib"): - source_name = os.path.splitext(source_name)[0] - return Dir(f"{out_dir}/dSYMs/{source_name}.dSYM") - elif platform == "linux": - return File(f"{source_path}.debug") - return "" - - def separate_debug_symbols(target, source, env): platform = env['platform'] out_dir = env['out_dir'] @@ -59,16 +44,18 @@ def run(cmd): if err != 0: print(f"ERROR: Failed to add debug link (exit code {err})") Exit(1) + else: + print("ERROR: Can't separate debug symbols on this platform") + Exit(1) -def command(env, source): - symbols_path = get_symbols_path(env, source) +def command(env, target, source): result = env.Command( - symbols_path, + target, source, Action(separate_debug_symbols, cmdstr="Separating debug symbols: $SOURCE -> $TARGET") ) - Clean(symbols_path, symbols_path) + Clean(target, target) return result From c716ff27e74bc3b35db7958719f8dea430dfd05f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 21:07:15 +0200 Subject: [PATCH 22/33] Only separate if debug_symbols option is ON --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 33fd640c..43e1c3ee 100644 --- a/SConstruct +++ b/SConstruct @@ -247,7 +247,7 @@ else: # *** Separate GDExtension debug symbols -if env["separate_debug_symbols"]: +if env["debug_symbols"] and env["separate_debug_symbols"]: # Note: Windows/MSVC separates by default. lib_path = str(library[0]) if platform in ["macos", "ios"]: From 0d45b60079b22ac22a25146db4976667bf1ebee7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 21:41:42 +0200 Subject: [PATCH 23/33] Clean up code --- SConstruct | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/SConstruct b/SConstruct index 43e1c3ee..5d90922e 100644 --- a/SConstruct +++ b/SConstruct @@ -197,15 +197,11 @@ if platform == "ios": extra += ".simulator" temp_dir = "project/addons/sentry/bin/ios/temp" - lib_path = f"{temp_dir}/libsentry.{platform}.{build_type}.{arch}{extra}.dylib" - - library = env.SharedLibrary( - lib_path, - source=sources, - ) + lib_name = f"libsentry.{platform}.{build_type}.{arch}{extra}" + lib_path = f"{temp_dir}/{lib_name}.dylib" + library = env.SharedLibrary(lib_path, source=sources) Default(library) - Clean(library, File(lib_path)) # Generate XCFramework for iOS GDExtension libs if requested device_lib = f"{temp_dir}/libsentry.{platform}.{build_type}.arm64.dylib" @@ -225,10 +221,10 @@ if platform == "ios": elif platform == "macos": # *** Build macOS shared library. - library = env.SharedLibrary( - f"{out_dir}/libsentry.{platform}.{build_type}.framework/libsentry.{platform}.{build_type}{extra}", - source=sources, - ) + lib_name = f"libsentry.{platform}.{build_type}{extra}" + lib_path = f"{out_dir}/{lib_name}.framework/{lib_name}" + + library = env.SharedLibrary(lib_path, source=sources) Default(library) else: @@ -238,10 +234,10 @@ else: if env["threads"] is False: extra += ".nothreads" - library = env.SharedLibrary( - f"{out_dir}/libsentry.{platform}.{build_type}.{arch}{extra}{shlib_suffix}", - source=sources, - ) + lib_name = f"libsentry.{platform}.{build_type}.{arch}{extra}" + lib_path = f"{out_dir}/{lib_name}{shlib_suffix}" + + library = env.SharedLibrary(lib_path, source=sources) Default(library) @@ -249,12 +245,8 @@ else: if env["debug_symbols"] and env["separate_debug_symbols"]: # Note: Windows/MSVC separates by default. - lib_path = str(library[0]) if platform in ["macos", "ios"]: - lib_name = os.path.basename(lib_path) - if lib_name.endswith(".dylib"): - lib_name = os.path.splitext(lib_name)[0] - dsym_path = f"{out_dir}/dSYMs/{lib_name}.dSYM" + dsym_path = f"{out_dir}/dSYMs/{lib_name}.framework.dSYM" separate_symbols = env.SeparateDebugSymbols(Dir(dsym_path), File(lib_path)) Default(separate_symbols) elif platform == "linux": From 8b55bcf2015c5983683dcac80b67bd47840e540c Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 21:46:22 +0200 Subject: [PATCH 24/33] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 725d2e5e..063aea94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Improve scene tree data capture performance ([#373](https://github.com/getsentry/sentry-godot/pull/373)) - Set device.name to OS hostname on Windows/Linux dedicated servers ([#391](https://github.com/getsentry/sentry-godot/pull/391)) +- Add build option to separate debug symbols, and separate GDExtension and crashpad_handler symbols in the official builds ([#399](https://github.com/getsentry/sentry-godot/pull/399)) ### Fixes From a65e5389fe36f19b587292d8124d012a43f56bc0 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 22:11:46 +0200 Subject: [PATCH 25/33] Clean up --- SConstruct | 1 - 1 file changed, 1 deletion(-) diff --git a/SConstruct b/SConstruct index 5d90922e..f1f5a524 100644 --- a/SConstruct +++ b/SConstruct @@ -124,7 +124,6 @@ elif internal_sdk == SDK.NATIVE: # Separate arch dirs to avoid crashpad handler filename conflicts. out_dir += "/" + arch out_dir = Dir(out_dir) -env['out_dir'] = out_dir # *** Build sentry-native. From b6a7c86c67b8505d0044c419505adbf344c90dfc Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 22:21:26 +0200 Subject: [PATCH 26/33] Revert "Clean up" This reverts commit a65e5389fe36f19b587292d8124d012a43f56bc0. --- SConstruct | 1 + 1 file changed, 1 insertion(+) diff --git a/SConstruct b/SConstruct index f1f5a524..5d90922e 100644 --- a/SConstruct +++ b/SConstruct @@ -124,6 +124,7 @@ elif internal_sdk == SDK.NATIVE: # Separate arch dirs to avoid crashpad handler filename conflicts. out_dir += "/" + arch out_dir = Dir(out_dir) +env['out_dir'] = out_dir # *** Build sentry-native. From ad26f7ccfbb6ad6eef09edacb06fbc179a7279dd Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 1 Oct 2025 22:22:37 +0200 Subject: [PATCH 27/33] Missing include --- site_scons/site_tools/separate_debug_symbols.py | 1 + 1 file changed, 1 insertion(+) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index a6b9913f..e185a343 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -3,6 +3,7 @@ """ from SCons.Script import Builder, Dir, File, Clean, Exit, Action +import os import os.path From 8367cd4d0708e2f1a0960e0bae0b60ffb1f7ccc3 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 10:22:49 +0200 Subject: [PATCH 28/33] Style fix --- SConstruct | 2 +- site_scons/site_tools/separate_debug_symbols.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 5d90922e..f172109a 100644 --- a/SConstruct +++ b/SConstruct @@ -124,7 +124,7 @@ elif internal_sdk == SDK.NATIVE: # Separate arch dirs to avoid crashpad handler filename conflicts. out_dir += "/" + arch out_dir = Dir(out_dir) -env['out_dir'] = out_dir +env["out_dir"] = out_dir # *** Build sentry-native. diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index e185a343..ee1e9f34 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -8,8 +8,8 @@ def separate_debug_symbols(target, source, env): - platform = env['platform'] - out_dir = env['out_dir'] + platform = env["platform"] + out_dir = env["out_dir"] target_path = str(target[0]) source_path = str(source[0]) From 708a671ec139686b85fc8112abd4b80bc887c913 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 14:53:38 +0200 Subject: [PATCH 29/33] Remove unused variable --- site_scons/site_tools/separate_debug_symbols.py | 1 - 1 file changed, 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index ee1e9f34..70dd4490 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -9,7 +9,6 @@ def separate_debug_symbols(target, source, env): platform = env["platform"] - out_dir = env["out_dir"] target_path = str(target[0]) source_path = str(source[0]) From 18daabfb9a8ed3087b2506deb27290a4c3165aca Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 14:54:47 +0200 Subject: [PATCH 30/33] Remove unused variable --- SConstruct | 1 - 1 file changed, 1 deletion(-) diff --git a/SConstruct b/SConstruct index 20d3eb36..922edda4 100644 --- a/SConstruct +++ b/SConstruct @@ -125,7 +125,6 @@ elif internal_sdk == SDK.NATIVE: # Separate arch dirs to avoid crashpad handler filename conflicts. out_dir += "/" + arch out_dir = Dir(out_dir) -env["out_dir"] = out_dir # *** Build sentry-native. From eb88a4efdde45f93d30adcc44c820469fb204a03 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 15:01:18 +0200 Subject: [PATCH 31/33] Remove another unused var --- site_scons/site_tools/separate_debug_symbols.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index 70dd4490..401960c3 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -28,8 +28,6 @@ def run(cmd): print(f"ERROR: Failed to strip debug symbols (exit code {err})") Exit(1) elif platform == "linux": - debug_path = f"{source_path}.debug" - err = run(f'objcopy --only-keep-debug --compress-debug-sections=zlib "{source_path}" "{target_path}"') if err != 0: print(f"ERROR: Failed to split debug symbols (exit code {err})") From 261e95bebcbd99ee65be4c86042553cfc632daa6 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 15:03:04 +0200 Subject: [PATCH 32/33] Remove unused import --- site_scons/site_tools/separate_debug_symbols.py | 1 - 1 file changed, 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index 401960c3..6de04f9c 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -4,7 +4,6 @@ from SCons.Script import Builder, Dir, File, Clean, Exit, Action import os -import os.path def separate_debug_symbols(target, source, env): From 02e3f1bf5a4d3790fc5611c914a42025ef48cea3 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 2 Oct 2025 15:03:55 +0200 Subject: [PATCH 33/33] Remove more unused imports --- site_scons/site_tools/separate_debug_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site_scons/site_tools/separate_debug_symbols.py b/site_scons/site_tools/separate_debug_symbols.py index 6de04f9c..567617a5 100644 --- a/site_scons/site_tools/separate_debug_symbols.py +++ b/site_scons/site_tools/separate_debug_symbols.py @@ -2,7 +2,7 @@ Tool to separate debug symbols. """ -from SCons.Script import Builder, Dir, File, Clean, Exit, Action +from SCons.Script import Clean, Exit, Action import os