Skip to content

Commit 99777f3

Browse files
committed
web: Use wasm exception when enabled
Always disable legacy exceptions.
1 parent 507ed9d commit 99777f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tools/web.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def generate(env):
5050
env.Append(CCFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
5151
env.Append(LINKFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
5252

53+
if not env["disable_exceptions"]:
54+
env.Append(CCFLAGS=["-fwasm-exceptions"])
55+
env.Append(LINKFLAGS=["-fwasm-exceptions"])
56+
5357
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])
5458

5559
# Refer to https://github.com/godotengine/godot/blob/master/platform/web/detect.py

0 commit comments

Comments
 (0)