aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)