Skip to content

Commit

Permalink
Remove warning about very large functions.
Browse files Browse the repository at this point in the history
4 years ago, commit 49d7717 removed
OUTLINING_LIMIT which was the only actionable item a user could do to avoid
this warning. Suggesting to compile with -Oz when the user is already
compiling with -Oz is just supidly insulting and not contructive user
feedback.

It is not Emscripten's job to have opinions about the size of functions.

Fixes <emscripten-core#20811>.
  • Loading branch information
manxorist committed Nov 30, 2023
1 parent 9de528b commit 1bd0128
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tools/js_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,6 @@ def write_chunk(chunk, i):
if not os.environ.get('EMCC_NO_OPT_SORT'):
funcs.sort(key=lambda x: (len(x[1]), x[0]), reverse=True)

if 'last' in passes and len(funcs):
count = funcs[0][1].count('\n')
if count > 3000:
print('warning: Output contains some very large functions (%s lines in %s), consider building source files with -Os or -Oz)' % (count, funcs[0][0]), file=sys.stderr)

for func in funcs:
f.write(func[1])
funcs = None
Expand Down

0 comments on commit 1bd0128

Please sign in to comment.