aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-11 20:31:13 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-11 20:31:13 -0700
commitfd301b105745a855e4cb231e217e8acf40df1858 (patch)
tree05a03fdf9b0012ce08048fe244fadcebf1d4b56c
parent5ba4497c3b1751a9f212e0fe0fe1d10151fab209 (diff)
parentde4f21890f44bedfca09ae7ef58ac45d00ca902b (diff)
Merge pull request #1051 from waywardmonkeys/fix-zero-chunks
Don't trigger 1-core assert when there are no chunks to work on.
-rw-r--r--AUTHORS1
-rwxr-xr-xemscripten.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 35aa74a7..87a656d6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -61,4 +61,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Alexander Gladysh <ag@logiceditor.com>
* Arlo Breault <arlolra@gmail.com>
* Jacob Lee <artdent@gmail.com> (copyright owned by Google, Inc.)
+* Joe Lee <jlee@imvu.com> (copyright owned by IMVU)
diff --git a/emscripten.py b/emscripten.py
index 8d46b888..502e951c 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -225,10 +225,10 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
# TODO: minimize size of forwarded data from funcs to what we actually need
- if cores == 1 and total_ll_size < MAX_CHUNK_SIZE:
- assert len(chunks) == 1, 'no point in splitting up without multiple cores'
-
if len(chunks) > 0:
+ if cores == 1 and total_ll_size < MAX_CHUNK_SIZE:
+ assert len(chunks) == 1, 'no point in splitting up without multiple cores'
+
if DEBUG: print >> sys.stderr, ' emscript: phase 2 working on %d chunks %s (intended chunk size: %.2f MB, meta: %.2f MB, forwarded: %.2f MB, total: %.2f MB)' % (len(chunks), ('using %d cores' % cores) if len(chunks) > 1 else '', chunk_size/(1024*1024.), len(meta)/(1024*1024.), len(forwarded_data)/(1024*1024.), total_ll_size/(1024*1024.))
commands = [