From d6c9d8d778954c65d69d1af04a9921d8887dec9f Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Sun, 18 Mar 2018 21:33:54 +0100 Subject: [PATCH] Disable Emscripten assertions in release_debug builds The messages generated by some assertions can be confusing to users. --- platform/javascript/detect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 7e6a1518ed9..989e6087169 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -65,13 +65,14 @@ def configure(env): elif (env["target"] == "release_debug"): env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) - env.Append(LINKFLAGS=['-O2', '-s', 'ASSERTIONS=1']) + env.Append(LINKFLAGS=['-O2']) # retain function names at the cost of file size, for backtraces and profiling env.Append(LINKFLAGS=['--profiling-funcs']) elif (env["target"] == "debug"): env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED']) env.Append(LINKFLAGS=['-O1', '-g']) + env.Append(LINKFLAGS=['-s', 'ASSERTIONS=1']) ## Compiler configuration