mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge pull request #79578 from Faless/web/4.x_dlink_visibility
[Web] Use `fvisibility=hidden` for side module when dlink_enabled.
This commit is contained in:
@@ -70,6 +70,9 @@ if env["dlink_enabled"]:
|
|||||||
sys_env.Append(LINKFLAGS=["-s", "WARN_ON_UNDEFINED_SYMBOLS=0"])
|
sys_env.Append(LINKFLAGS=["-s", "WARN_ON_UNDEFINED_SYMBOLS=0"])
|
||||||
# Force exporting the standard library (printf, malloc, etc.)
|
# Force exporting the standard library (printf, malloc, etc.)
|
||||||
sys_env["ENV"]["EMCC_FORCE_STDLIBS"] = "libc,libc++,libc++abi"
|
sys_env["ENV"]["EMCC_FORCE_STDLIBS"] = "libc,libc++,libc++abi"
|
||||||
|
sys_env["CCFLAGS"].remove("-fvisibility=hidden")
|
||||||
|
sys_env["LINKFLAGS"].remove("-fvisibility=hidden")
|
||||||
|
|
||||||
# The main emscripten runtime, with exported standard libraries.
|
# The main emscripten runtime, with exported standard libraries.
|
||||||
sys = sys_env.Program(build_targets, ["web_runtime.cpp"])
|
sys = sys_env.Program(build_targets, ["web_runtime.cpp"])
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,8 @@ def configure(env: "Environment"):
|
|||||||
|
|
||||||
env.Append(CCFLAGS=["-s", "SIDE_MODULE=2"])
|
env.Append(CCFLAGS=["-s", "SIDE_MODULE=2"])
|
||||||
env.Append(LINKFLAGS=["-s", "SIDE_MODULE=2"])
|
env.Append(LINKFLAGS=["-s", "SIDE_MODULE=2"])
|
||||||
|
env.Append(CCFLAGS=["-fvisibility=hidden"])
|
||||||
|
env.Append(LINKFLAGS=["-fvisibility=hidden"])
|
||||||
env.extra_suffix = ".dlink" + env.extra_suffix
|
env.extra_suffix = ".dlink" + env.extra_suffix
|
||||||
|
|
||||||
# Reduce code size by generating less support code (e.g. skip NodeJS support).
|
# Reduce code size by generating less support code (e.g. skip NodeJS support).
|
||||||
|
|||||||
Reference in New Issue
Block a user