summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-12-22 12:08:34 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-12-22 12:12:01 +0100
commit1831677f6366db9ee8ff08497f5dc58ae396b057 (patch)
treef27f2a0513032a14ed4b49ecd448bcbfafaad735 /SConstruct
parentfa28efa51d232c7e3cd0fe8100861c5d518eefd0 (diff)
downloadfork-godot-webrtc-native-1831677f6366db9ee8ff08497f5dc58ae396b057.tar.gz
fork-godot-webrtc-native-1831677f6366db9ee8ff08497f5dc58ae396b057.tar.bz2
fork-godot-webrtc-native-1831677f6366db9ee8ff08497f5dc58ae396b057.zip
[Windows/MinGW] Only export extension init symbol
When building for Windows using MinGW GCC we need to apply the same workaround we use on Linux to only export the necessary symbols so we can safely statically link libstdc++
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct8
1 files changed, 5 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 140fe29..c77b469 100644
--- a/SConstruct
+++ b/SConstruct
@@ -167,11 +167,13 @@ env.Depends(sources, ssl + rtc)
# symbols using a GCC version script, or we might end up overriding symbols from other libraries.
# Using "-fvisibility=hidden" will not work, since libstdc++ explicitly exports its symbols.
symbols_file = None
-if env["platform"] == "linux":
+if env["platform"] == "linux" or (
+ env["platform"] == "windows" and env.get("use_mingw", False) and not env.get("use_llvm", False)
+):
if env["godot_version"] == "3":
- symbols_file = env.File("misc/dist/linux/symbols-gdnative.map")
+ symbols_file = env.File("misc/gcc/symbols-gdnative.map")
else:
- symbols_file = env.File("misc/dist/linux/symbols-extension.map")
+ symbols_file = env.File("misc/gcc/symbols-extension.map")
env.Append(
LINKFLAGS=[
"-Wl,--no-undefined,--version-script=" + symbols_file.abspath,