aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-17 11:26:12 +0100
committerAlon Zakai <alonzakai@gmail.com>2013-02-17 11:26:12 +0100
commit13c0ad5f16dda77c8ad5329f198286d1efbbbcb9 (patch)
treee3e29edc80cb08e71a2226d06279d4ae5c73a016 /emcc
parent0495b5b1b1b94fdcd9626a883815f3a2173d4eab (diff)
disable closure if debug info was requested (-g)
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/emcc b/emcc
index 466a1e9a..ce84773d 100755
--- a/emcc
+++ b/emcc
@@ -182,6 +182,12 @@ Options that are modified or new in %s include:
the last compilation phase from bitcode to
JavaScript, or else we will remove it by
default in -O1 and above.
+ In -O0, line numbers wil be shown in the
+ generated code. In -O1 and above, the optimizer
+ removes those comments. This flag does however
+ have the effect of disabling anything that
+ causes name mangling or minification (closure
+ or the registerize pass).
--typed-arrays <mode> 0: No typed arrays
1: Parallel typed arrays
@@ -886,6 +892,10 @@ try:
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 keep_debug and closure:
+ print >> sys.stderr, 'emcc: warning: disabling closure because debug info was requested'
+ closure = False
+
if minify_whitespace is None:
minify_whitespace = closure # if closure is run, minify whitespace