Skip to content

Commit 8862ad5

Browse files
authored
Use LLVM's legacy pass manager for now (#13426)
See #13427
1 parent 6a5e0a0 commit 8862ad5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tools/building.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,11 @@ def link_lld(args, target, external_symbol_list=None):
560560
for a in llvm_backend_args():
561561
cmd += ['-mllvm', a]
562562

563+
# LLVM has turned on the new pass manager by default, but it causes some code
564+
# size regressions. For now, use the legacy one.
565+
# https://github.com/emscripten-core/emscripten/issues/13427
566+
cmd += ['--lto-legacy-pass-manager']
567+
563568
# For relocatable output (generating an object file) we don't pass any of the
564569
# normal linker flags that are used when building and exectuable
565570
if '--relocatable' not in args and '-r' not in args:

tools/shared.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ def get_cflags(user_args):
523523
'-D__unix',
524524
'-D__unix__']
525525

526+
# LLVM has turned on the new pass manager by default, but it causes some code
527+
# size regressions. For now, use the legacy one.
528+
# https://github.com/emscripten-core/emscripten/issues/13427
529+
c_opts += ['-flegacy-pass-manager']
530+
526531
# Changes to default clang behavior
527532

528533
# Implicit functions can cause horribly confusing function pointer type errors, see #2175

0 commit comments

Comments
 (0)