diff options
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 29 |
1 files changed, 17 insertions, 12 deletions
@@ -160,7 +160,8 @@ Options that are modified or new in %s include: output. -O3 As -O2, plus additional optimizations that can - take a significant amount of compilation time. + take a significant amount of compilation time and/or + are relatively new. For tips on optimizing your code, see https://github.com/kripken/emscripten/wiki/Optimizing-Code @@ -485,10 +486,13 @@ Options that are modified or new in %s include: libraries, and after any link-time optimizations (if any). - --memory-init-file <on> If on, we generate a separate memory initialization - file. This is more efficient than storing the - memory initialization data embedded inside - JavaScript as text. (default is off) + --memory-init-file <on> 0: Do not emit a separate memory initialization + file, keep the static initialization inside + the generated JavaScript as text (default) + 1: Emit a separate memory initialization file + in binary format. This is more efficient than + storing it as text inside JavaScript, but does + mean you have another file to publish. -Wno-warn-absolute-paths If not specified, the compiler will warn about any uses of absolute paths in -I and -L command line @@ -1219,7 +1223,8 @@ try: assert not shared.Settings.PGO, 'cannot run PGO in ASM_JS mode' if shared.Settings.SAFE_HEAP and not js_opts: - logging.warning('asm.js+SAFE_HEAP requires js opts to be run (-O1 or above by default)') + js_opts = True + logging.warning('enabling js opts to allow SAFE_HEAP to work properly') if shared.Settings.ALLOW_MEMORY_GROWTH: logging.error('Cannot enable ALLOW_MEMORY_GROWTH with asm.js, build with -s ASM_JS=0 if you need a growable heap'); @@ -1994,12 +1999,12 @@ try: else: return 'eliminate' - js_optimizer_queue += [get_eliminate()] + if opt_level >= 2: + js_optimizer_queue += [get_eliminate()] - if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION: - js_optimizer_queue += ['aggressiveVariableElimination'] + if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION: + js_optimizer_queue += ['aggressiveVariableElimination'] - if opt_level >= 2: js_optimizer_queue += ['simplifyExpressions'] if closure and not shared.Settings.ASM_JS: @@ -2018,13 +2023,13 @@ try: js_optimizer_queue += ['outline'] js_optimizer_extra_info['sizeToOutline'] = shared.Settings.OUTLINING_LIMIT - if (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3: + if opt_level >= 2 and (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3: if shared.Settings.ASM_JS and opt_level >= 3 and shared.Settings.OUTLINING_LIMIT == 0: js_optimizer_queue += ['registerizeHarder'] else: js_optimizer_queue += ['registerize'] - if opt_level > 0: + if opt_level >= 2: if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyNames'] if debug_level == 0: js_optimizer_queue += ['minifyWhitespace'] |