ref: 023e4b229d57777eebf7abd9adb4192407e84698
parent: 195ecf2b9a52eced971e3e5eb6f89fc2268a9cd1
author: Martin Hermant <martin.hermant@gmail.com>
date: Mon May 29 06:50:08 EDT 2017
wscript : use .min.js extension for release build add assersions in debug build
--- a/wscript
+++ b/wscript
@@ -228,6 +228,14 @@
if target_platform == 'emscripten':
import os.path
ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]
+
+ if ctx.options.build_type == "debug":
+ ctx.env.cshlib_PATTERN = '%s.js'
+ ctx.env.LINKFLAGS_cshlib += ['-s','ASSERTIONS=1']
+ else:
+ ctx.env.LINKFLAGS += ['-Oz']
+ ctx.env.cshlib_PATTERN = '%s.min.js'
+
ctx.env.cprogram_PATTERN = "%s.js"
if (ctx.options.enable_atlas != True):
ctx.options.enable_atlas = False