Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -13406,8 +13406,9 @@ def test_wasm_worker_preprocessor_flags(self):
@parameterized({
# we will warn here since -O2 runs the optimizer and -g enables DWARF
'O2_g': (True, ['-O2', '-g']),
# asyncify will force wasm-opt to run as well, so we warn here too
'asyncify_g': (True, ['-sASYNCIFY', '-g']),
# asyncify will force wasm-opt to run as well, but without optimizations, so
# we do not warn about the lack of optimization
'asyncify_g': (False, ['-sASYNCIFY', '-g']),
# with --profiling-funcs however we do not use DWARF (we just emit the
# names section) and will not warn.
'O2_pfuncs': (False, ['-O2', '--profiling-funcs']),
Expand Down
2 changes: 1 addition & 1 deletion tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ def phase_binaryen(target, options, wasm_target):
intermediate_debug_info -= 1
# currently binaryen's DWARF support will limit some optimizations; warn on
# that. see https://github.com/emscripten-core/emscripten/issues/15269
if settings.GENERATE_DWARF:
if settings.GENERATE_DWARF and should_run_binaryen_optimizer():
diagnostics.warning('limited-postlink-optimizations', 'running limited binaryen optimizations because DWARF info requested (or indirectly required)')
with ToolchainProfiler.profile_block('wasm_opt'):
building.run_wasm_opt(wasm_target,
Expand Down