Skip to content

Commit 05c64e7

Browse files
Only export extension init symbol on Linux (#140)
This fixes a crash that occurs when the extension is used alongside other extensions.
1 parent d21039c commit 05c64e7

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/build_all.yml

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ jobs:
300300
rm -r ./addons/Wwise/native/src
301301
rm -r ./addons/Wwise/native/vs2022
302302
rm -r ./addons/Wwise/native/android
303+
rm -r ./addons/Wwise/native/linux
303304
rm -r ./addons/Wwise/native/doc_classes
304305
rm ./addons/Wwise/native/SConstruct
305306
rm ./LICENSE

addons/Wwise/native/SConstruct

+9-2
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,14 @@ elif env["platform"] == "linux":
499499

500500
env.Append(CCFLAGS=["-fPIC", "-Wwrite-strings"])
501501
env.Append(CXXFLAGS=["-std=c++20"])
502-
env.Append(LINKFLAGS=["-Wl,-R,'$$ORIGIN'"])
502+
symbols_file = env.File("linux/symbols-extension.map")
503+
env.Append(
504+
LINKFLAGS=[
505+
"-Wl,-R,'$$ORIGIN'",
506+
"-Wl,--no-undefined,--version-script=" + symbols_file.abspath,
507+
"-static-libgcc",
508+
"-static-libstdc++",
509+
])
503510

504511
# iOS build settings
505512
elif env["platform"] == "ios":
@@ -742,4 +749,4 @@ if env["platform"] == "ios":
742749

743750
print_section_header("Compiling GDExtension")
744751

745-
Help(opts.GenerateHelpText(env))
752+
Help(opts.GenerateHelpText(env))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
global:
3+
wwise_library_init;
4+
local:
5+
*;
6+
};

0 commit comments

Comments
 (0)