aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-30 11:51:38 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:20 -0800
commitee32a53886e7a4788776e4199115626fb2ce95a7 (patch)
treeda84d7e6c876a96e77559b06415d871916331e91
parente6b1e5e6a6262c495187769f9f418386bb8eae59 (diff)
move emcc minify decision to after we potentially modify closure
-rwxr-xr-xemcc5
1 files changed, 3 insertions, 2 deletions
diff --git a/emcc b/emcc
index 704f0adb..b9dcf8ab 100755
--- a/emcc
+++ b/emcc
@@ -724,8 +724,6 @@ try:
if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level]
if llvm_lto is None: llvm_lto = llvm_opts > 0
if closure is None: closure = 1 if opt_level >= 2 else 0
- if minify_whitespace is None:
- minify_whitespace = closure # if closure is run, minify whitespace
if opt_level <= 0: keep_debug = True # always keep debug in -O0
if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state
@@ -860,6 +858,9 @@ try:
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
+
## Compile source code to bitcode
if DEBUG: print >> sys.stderr, 'emcc: compiling to bitcode'