Skip to content

Commit

Permalink
Use release/debug in library names instead of build target
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Dec 10, 2024
1 parent 67570d1 commit 1a9af2b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 31 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_gdextension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ jobs:
- name: Separate debug symbols on Linux
if: matrix.platform == 'linux'
env:
BUILD_TYPE: ${{matrix.target == 'template_release' && 'release' || 'debug'}}
shell: bash
run: |
cd project/addons/sentrysdk/bin/linux/
libname=libsentrysdk.${{matrix.platform}}.${{matrix.target}}.${{matrix.arch}}.so
objcopy --only-keep-debug ${libname} ${libname}.debug
objcopy --add-gnu-debuglink ${libname}.debug ${libname}
strip --strip-debug ${libname}
lib=libsentrysdk.${{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
Expand Down
13 changes: 8 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,27 @@ sources += Glob("src/sentry/*.cpp")
if env["platform"] in ["linux", "windows", "macos"]:
sources += Glob("src/sentry/native/*.cpp")

build_type = "release" if env["target"] == "template_release" else "debug"

if env["platform"] == "macos":
library = env.SharedLibrary(
"{bin}/{platform}/lib{name}.{platform}.{target}.framework/lib{name}.{platform}.{target}".format(
"{bin}/{platform}/lib{name}.{platform}.{build_type}.framework/lib{name}.{platform}.{build_type}".format(
bin=BIN_DIR,
name=EXTENSION_NAME,
platform=env["platform"],
target=env["target"],
build_type=build_type,
),
source=sources,
)
else:
library = env.SharedLibrary(
"{bin}/{platform}/lib{name}{suffix}{shlib_suffix}".format(
"{bin}/{platform}/lib{name}.{platform}.{build_type}.{arch}{shlib_suffix}".format(
bin=BIN_DIR,
name=EXTENSION_NAME,
platform=env["platform"],
suffix=env["suffix"],
shlib_suffix=env["SHLIBSUFFIX"],
build_type=build_type,
arch=env["arch"],
shlib_suffix=env["SHLIBSUFFIX"]
),
source=sources,
)
Expand Down
44 changes: 22 additions & 22 deletions src/manifest.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ compatibility_minimum = "{compatibility_minimum}"

[libraries]

macos.debug = "res://addons/{name}/bin/macos/lib{name}.macos.editor.framework"
macos.release = "res://addons/{name}/bin/macos/lib{name}.macos.template_release.framework"
windows.debug.x86_32 = "res://addons/{name}/bin/windows/lib{name}.windows.editor.x86_32.dll"
windows.release.x86_32 = "res://addons/{name}/bin/windows/lib{name}.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://addons/{name}/bin/windows/lib{name}.windows.editor.x86_64.dll"
windows.release.x86_64 = "res://addons/{name}/bin/windows/lib{name}.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/{name}/bin/linux/lib{name}.linux.editor.x86_64.so"
linux.release.x86_64 = "res://addons/{name}/bin/linux/lib{name}.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://addons/{name}/bin/linux/lib{name}.linux.editor.arm64.so"
linux.release.arm64 = "res://addons/{name}/bin/linux/lib{name}.linux.template_release.arm64.so"
linux.debug.rv64 = "res://addons/{name}/bin/linux/lib{name}.linux.editor.rv64.so"
linux.release.rv64 = "res://addons/{name}/bin/linux/lib{name}.linux.template_release.rv64.so"
android.debug.arm64 = "res://addons/{name}/bin/android/lib{name}.android.template_debug.arm64.so"
android.release.arm64 = "res://addons/{name}/bin/android/lib{name}.android.template_release.arm64.so"
android.debug.arm32 = "res://addons/{name}/bin/android/lib{name}.android.template_debug.arm32.so"
android.release.arm32 = "res://addons/{name}/bin/android/lib{name}.android.template_release.arm32.so"
android.debug.x86_64 = "res://addons/{name}/bin/android/lib{name}.android.template_debug.x86_64.so"
android.release.x86_64 = "res://addons/{name}/bin/android/lib{name}.android.template_release.x86_64.so"
android.debug.x86_32 = "res://addons/{name}/bin/android/lib{name}.android.template_debug.x86_32.so"
android.release.x86_32 = "res://addons/{name}/bin/android/lib{name}.android.template_release.x86_32.so"
web.debug.wasm32 = "res://addons/{name}/bin/web/lib{name}.web.template_debug.wasm32.wasm"
web.release.wasm32 = "res://addons/{name}/bin/web/lib{name}.web.template_release.wasm32.wasm"
macos.debug = "res://addons/{name}/bin/macos/lib{name}.macos.debug.framework"
macos.release = "res://addons/{name}/bin/macos/lib{name}.macos.release.framework"
windows.debug.x86_32 = "res://addons/{name}/bin/windows/lib{name}.windows.debug.x86_32.dll"
windows.release.x86_32 = "res://addons/{name}/bin/windows/lib{name}.windows.release.x86_32.dll"
windows.debug.x86_64 = "res://addons/{name}/bin/windows/lib{name}.windows.debug.x86_64.dll"
windows.release.x86_64 = "res://addons/{name}/bin/windows/lib{name}.windows.release.x86_64.dll"
linux.debug.x86_64 = "res://addons/{name}/bin/linux/lib{name}.linux.debug.x86_64.so"
linux.release.x86_64 = "res://addons/{name}/bin/linux/lib{name}.linux.release.x86_64.so"
linux.debug.arm64 = "res://addons/{name}/bin/linux/lib{name}.linux.debug.arm64.so"
linux.release.arm64 = "res://addons/{name}/bin/linux/lib{name}.linux.release.arm64.so"
linux.debug.rv64 = "res://addons/{name}/bin/linux/lib{name}.linux.debug.rv64.so"
linux.release.rv64 = "res://addons/{name}/bin/linux/lib{name}.linux.release.rv64.so"
android.debug.arm64 = "res://addons/{name}/bin/android/lib{name}.android.debug.arm64.so"
android.release.arm64 = "res://addons/{name}/bin/android/lib{name}.android.release.arm64.so"
android.debug.arm32 = "res://addons/{name}/bin/android/lib{name}.android.debug.arm32.so"
android.release.arm32 = "res://addons/{name}/bin/android/lib{name}.android.release.arm32.so"
android.debug.x86_64 = "res://addons/{name}/bin/android/lib{name}.android.debug.x86_64.so"
android.release.x86_64 = "res://addons/{name}/bin/android/lib{name}.android.release.x86_64.so"
android.debug.x86_32 = "res://addons/{name}/bin/android/lib{name}.android.debug.x86_32.so"
android.release.x86_32 = "res://addons/{name}/bin/android/lib{name}.android.release.x86_32.so"
web.debug.wasm32 = "res://addons/{name}/bin/web/lib{name}.web.debug.wasm32.wasm"
web.release.wasm32 = "res://addons/{name}/bin/web/lib{name}.web.release.wasm32.wasm"

[dependencies]

Expand Down

0 comments on commit 1a9af2b

Please sign in to comment.