raise an error if no functions were left to process

This commit is contained in:
Alon Zakai 2013-06-08 20:20:55 -07:00
Родитель a84ed074b7
Коммит de294ed89b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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)