aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-08 20:20:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-08 20:22:13 -0700
commitde294ed89b3ad8ae486b5089420182d60a8c06db (patch)
tree12c082074a5d7c05c8a1c70684e4e0f9a4d5b275
parenta84ed074b7d9f491a26e175644c0193c5dbb3b9a (diff)
raise an error if no functions were left to process
-rwxr-xr-xemscripten.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py
index 248d0ce4..d8312855 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -127,6 +127,9 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
if DEBUG and len(meta) > 1024*1024: print >> sys.stderr, 'emscript warning: large amounts of metadata, will slow things down'
if DEBUG: print >> sys.stderr, ' emscript: split took %s seconds' % (time.time() - t)
+ if len(funcs) == 0:
+ raise RuntimeError('No functions to process. Make sure you prevented LLVM from eliminating them as dead (use EXPORTED_FUNCTIONS if necessary, see the FAQ)')
+
#if DEBUG:
# print >> sys.stderr, '========= pre ================\n'
# print >> sys.stderr, ''.join(pre)