From 1bd01287617c1f3afe7cefedb2b7fb0e1c56511d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Thu, 30 Nov 2023 17:51:30 +0100 Subject: [PATCH] Remove warning about very large functions. 4 years ago, commit 49d7717600bdb89010e84f50bf326a34ee85d439 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 . --- tools/js_optimizer.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py index d5dd1ed852b12..6b8741059d9a4 100755 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -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