aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-07 10:44:10 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:24 -0800
commit3ee9d95f98391ab27fad70ed91321093febe518d (patch)
tree08d4ee311970c40d10d3e793f5b3bd46a685f699 /emcc
parent869a1b71291122beb210e0e9d37e86effbde1f62 (diff)
test fixes and set sign and overflow correction to 1 when in asm mode
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc15
1 files changed, 11 insertions, 4 deletions
diff --git a/emcc b/emcc
index afe4f22b..27b873c4 100755
--- a/emcc
+++ b/emcc
@@ -851,13 +851,20 @@ try:
exec('shared.Settings.' + key + ' = ' + value)
# Apply effects from settings
+ if shared.Settings.ASM_JS:
+ if closure:
+ print >> sys.stderr, 'emcc: warning: disabling closure because it is not compatible with asm.js code generation'
+ closure = False
+ if shared.Settings.CORRECT_SIGNS != 1:
+ print >> sys.stderr, 'emcc: warning: setting CORRECT_SIGNS to 1 for asm.js code generation'
+ shared.Settings.CORRECT_SIGNS = 1
+ if shared.Settings.CORRECT_OVERFLOWS != 1:
+ print >> sys.stderr, 'emcc: warning: setting CORRECT_OVERFLOWS to 1 for asm.js code generation'
+ shared.Settings.CORRECT_OVERFLOWS = 1
+
if shared.Settings.CORRECT_SIGNS >= 2 or shared.Settings.CORRECT_OVERFLOWS >= 2 or shared.Settings.CORRECT_ROUNDINGS >= 2:
keep_debug = True # must keep debug info to do line-by-line operations
- if closure and shared.Settings.ASM_JS:
- print >> sys.stderr, 'emcc: warning: disabling closure because it is not compatible with asm.js code generation'
- closure = False
-
if minify_whitespace is None:
minify_whitespace = closure # if closure is run, minify whitespace