diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-06 20:36:20 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-06 20:36:20 -0800 |
commit | cd536b75c1f33f300513dfbc15c1e67ca01bfd80 (patch) | |
tree | 3de5cfbb3c6e29607f97f2acf143a23ba2a556c4 /emscripten.py | |
parent | 0591fabb67954257cfa3a024b78f46a392fd4a31 (diff) |
fix broken --optimize
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index e689cc69..4b3740d1 100755 --- a/emscripten.py +++ b/emscripten.py @@ -89,7 +89,9 @@ def optimize(filepath): Returns: The path to the optimized file. """ - command = [shared.LLVM_OPT, '-o=-', filepath] + shared.pick_llvm_opts(3, True) + shared.Building.LLVM_OPTS = 1 + shared.Settings.QUANTUM_SIZE = 1 # just so it isn't 4, and we assume we can do things that fail on q1 + command = [shared.LLVM_OPT, '-o=-', filepath] + shared.Building.pick_llvm_opts(3, True) with get_temp_file('.bc') as out: ret = subprocess.call(command, stdout=out) if ret != 0: raise RuntimeError('Could not optimize %s.' % filepath) return out.name |