Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Emscripten: Pass "-s" flag directly to the linker when building without debug symbols

NoctemCat0dc2c39cb848
diff --git a/SConstruct b/SConstruct
index 1ac334861cb..cf4beb08cd7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -883,6 +883,9 @@ else:
if methods.is_apple_clang(env):
# Apple Clang, its linker doesn't like -s.
env.AppendUnique(LINKFLAGS=["-Wl,-S", "-Wl,-x", "-Wl,-dead_strip"])
+ elif methods.using_emcc(env):
+ # Emscripten can use separate -s for build options, so pass the alias directly to the linker.
+ env.AppendUnique(LINKFLAGS=["-Wl,-s"])
else:
env.AppendUnique(LINKFLAGS=["-s"])