Browse Source

Disable Emscripten assertions in release_debug builds

The messages generated by some assertions can be confusing to users.
Leon Krause 7 years ago
parent
commit
d6c9d8d778
1 changed files with 2 additions and 1 deletions
  1. 2 1
      platform/javascript/detect.py

+ 2 - 1
platform/javascript/detect.py

@@ -65,13 +65,14 @@ def configure(env):
 
 
     elif (env["target"] == "release_debug"):
     elif (env["target"] == "release_debug"):
         env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
         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
         # retain function names at the cost of file size, for backtraces and profiling
         env.Append(LINKFLAGS=['--profiling-funcs'])
         env.Append(LINKFLAGS=['--profiling-funcs'])
 
 
     elif (env["target"] == "debug"):
     elif (env["target"] == "debug"):
         env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED'])
         env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED'])
         env.Append(LINKFLAGS=['-O1', '-g'])
         env.Append(LINKFLAGS=['-O1', '-g'])
+        env.Append(LINKFLAGS=['-s', 'ASSERTIONS=1'])
 
 
     ## Compiler configuration
     ## Compiler configuration