aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-09 08:11:30 -0400
committerAlon Zakai <alonzakai@gmail.com>2013-10-09 11:10:07 -0400
commite10ee6c5cb0aa89bbae465a1e667a03c0e13aa39 (patch)
tree0aab8bd9e00c3fa3bfaee8022ff7f0f7310b1499 /emcc
parent933e92a754d2b352add7d5b763dfc9d11cdc99c9 (diff)
run relooper in -O1, and do not run js opts there
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc9
1 files changed, 6 insertions, 3 deletions
diff --git a/emcc b/emcc
index cb489e5d..3b068702 100755
--- a/emcc
+++ b/emcc
@@ -129,14 +129,14 @@ Most normal gcc/g++ options will work, for example:
Options that are modified or new in %s include:
-O0 No optimizations (default)
-O1 Simple optimizations, including asm.js, LLVM -O1
- optimizations, and no runtime assertions
+ optimizations, relooping, and no runtime assertions
or C++ exception catching (to re-enable
C++ exception catching, use
-s DISABLE_EXCEPTION_CATCHING=0 ).
(For details on the affects of different
opt levels, see apply_opt_level() in
tools/shared.py and also src/settings.js.)
- -O2 As -O1, plus the relooper (loop recreation),
+ -O2 As -O1, plus various js-level optimizatios,
LLVM -O3 optimizations, and
-s ALIASING_FUNCTION_POINTERS=1
@@ -258,6 +258,9 @@ Options that are modified or new in %s include:
try adjusting JAVA_HEAP_SIZE in the environment
(for example, to 4096m for 4GB).
+ Note: Closure is only run if js opts are being
+ done (-O2 or above, or --js-opts 1).
+
--js-transform <cmd> <cmd> will be called on the generated code
before it is optimized. This lets you modify
the JavaScript, for example adding some code
@@ -933,7 +936,7 @@ try:
if default_cxx_std:
newargs = newargs + [default_cxx_std]
- if js_opts is None: js_opts = opt_level >= 1
+ if js_opts is None: js_opts = opt_level >= 2
if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level]
if llvm_lto is None and opt_level >= 3: llvm_lto = 3
if opt_level == 0: debug_level = 4