Skip to content

perf(wasm): upgrade to clang-tool-chain 1.5.1, wire all 7 native launchers including ctc-wasm-ld - #2490

Merged
zackees merged 4 commits into
masterfrom
wire-wasm-emstrip-emranlib-emnm
May 19, 2026
Merged

zackees merged 4 commits into
masterfrom
wire-wasm-emstrip-emranlib-emnm

Conversation

@zackees

@zackees zackees commented May 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Upgrades clang-tool-chain to 1.5.1, which closes both upstream issues filed during the previous WASM optimization work (#22, #23), and wires the full set of native launchers — including ctc-wasm-ld for the emcc link step, which was previously blocked on upstream.

Builds on #2487 (ctc-emcc), #2489 (ctc-emar).

What's new in clang-tool-chain 1.5.1

Closed issue What landed
#22 (ctc-wasm-ld integration) clang-tool-chain install emscripten now patches shared.py to honor the EMCC_WASM_LD env var. Setting it lets downstream projects route emcc's internal wasm-ld through a custom binary (e.g., ctc-wasm-ld).
#23 (Python wrapper parity) New console scripts: clang-tool-chain-emstrip / -emranlib / -emnm / -wasm-ld — mirroring the existing -emcc / -empp / -emar trio.
#25 (consolidation) compile-native now produces 1 binary + 17 hardlinks instead of 17 separate compile targets. argv[0] basename dispatches. Saves ~19 MB per platform.

Changes in this PR

pyproject.toml

-    "clang-tool-chain>=1.4.0",
+    "clang-tool-chain>=1.5.1",

ci/meson/build_config.py

  • Added @typechecked decorators to both EmccNativeLaunchers and WasmNativeEntries (matches the project convention enforced in 5 other ci/ modules; CodeRabbit feedback).
  • Added wasm_ld field to both dataclasses.
  • Simplified WasmNativeEntries: strip / ranlib / nm / wasm_ld are now always str (Python wrapper fallback names exist in 1.5.1) — no more Optional or omit-on-missing complexity.
  • _ensure_emcc_native_launcher probes ctc-wasm-ld alongside the other six binaries.
  • resolve_wasm_native_entries populates all fields: native paths when available, Python wrapper names otherwise.

ci/wasm_build.py

  • New _ensure_emscripten_wasm_ld_patch() helper: lazily calls ensure_emscripten_available() once per process to apply (idempotent) the EMCC_WASM_LD shared.py patch on the existing emscripten install.
  • _render_wasm_cross_file now sets EMCC_WASM_LD in os.environ pointing at the resolved wasm_ld path. This routes emcc's internal wasm-ld invocation through our launcher.
  • Cross-file template always emits strip / ranlib / nm (fallbacks exist).
  • Logs resolution status for all six tools plus ctc-wasm-ld.

Verification

Clean WASM build of examples/Blink with native launcher cache cleared:

[WASM] Using native ctc-emcc launcher: ...\ctc-emcc.exe
[WASM] Using native ctc-emar launcher: ...\ctc-emar.exe
[WASM] Using native ctc-emstrip launcher: ...\ctc-emstrip.exe
[WASM] Using native ctc-emranlib launcher: ...\ctc-emranlib.exe
[WASM] Using native ctc-emnm launcher: ...\ctc-emnm.exe
[WASM] Using native ctc-wasm-ld for emcc linker: ...\ctc-wasm-ld.exe
[WASM] Build successful!
  Total:    17.50s

shared.py patch confirmed in place at ~/.clang-tool-chain/emscripten/win/x86_64/emscripten/tools/shared.py:

# CTC_EMCC_WASM_LD_PATCH: honor EMCC_WASM_LD for ctc-wasm-ld integration
WASM_LD = os.environ.get('EMCC_WASM_LD') or llvm_tool_path('wasm-ld')

Test plan

  • bash lint — pass
  • bash compile wasm --examples Blink — pass, all 7 launchers resolved
  • shared.py patch verified applied
  • @typechecked decorators added per project convention

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Expanded WebAssembly native toolchain support: strip, ranlib, nm and wasm-ld are now resolved and surfaced to build configuration, logs, and generated cross-files.
    • Cross-file generation now respects the emcc linker environment (EMCC_WASM_LD) when selecting the linker.
  • Behavior Change

    • Native launcher resolution is strict: missing native binaries cause resolution to fail rather than falling back.
  • Bug Fixes

    • Improved cancellation handling: KeyboardInterrupt is now caught, handled, and re-raised to ensure proper cleanup.
  • Chores

    • Bumped clang-tool-chain minimum version.

Review Change Stack

Extends the WASM cross-file generator to wire the remaining native
launchers from clang-tool-chain's emtool family (1.3.1+). All four
binaries (emar + emstrip + emranlib + emnm) come from a single
launcher_emtool.cpp compilation, so this is essentially free.

Changes:
  - EmccNativeLaunchers dataclass: add emstrip/emranlib/emnm fields.
  - WasmNativeEntries dataclass: add strip/ranlib/nm fields (Optional;
    None means meson should omit the corresponding cross-file field
    because clang-tool-chain ships no Python wrapper fallback for these
    three — see zackees/clang-tool-chain#23).
  - _ensure_emcc_native_launcher: probe all six binaries; trigger
    compile_native() if any are missing.
  - resolve_wasm_native_entries: populate the new fields.
  - _render_wasm_cross_file: emit strip/ranlib/nm only when the native
    launcher resolved; log each that resolved.

The compile/link path is unchanged — strip/ranlib/nm aren't typically
invoked during normal WASM compile-and-link. Wiring them follows the
established pattern and gives speedup if/when meson does invoke them
(e.g., on `meson install --strip` or future cross-build flows).

Companion to upstream tracking:
  - zackees/clang-tool-chain#22 (no clean ctc-wasm-ld integration path)
  - zackees/clang-tool-chain#23 (Python wrapper parity for emstrip/
    emranlib/emnm — once shipped, this PR's None-omission logic can be
    simplified to match the emar fallback pattern)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92f4b936-5d31-47ac-929f-0e08f687d287

📥 Commits

Reviewing files that changed from the base of the PR and between afeeb91 and 12bdd8f.

📒 Files selected for processing (2)
  • ci/compiler/pio.py
  • ci/util/fbuild_runner.py

📝 Walkthrough

Walkthrough

Adds required native launcher paths (emcc/empp/emar/emstrip/emranlib/emnm/wasm_ld) and updates resolvers/dataclasses to require and validate them; introduces an Emscripten patch helper, sets EMCC_WASM_LD when rendering Meson cross-files, emits strip/ranlib/nm in [binaries], and bumps clang-tool-chain.

Changes

Extend emcc native tool launcher support to strip, ranlib, nm, wasm_ld

Layer / File(s) Summary
Dataclass and typing updates
ci/meson/build_config.py
Adds typechecked import and @typechecked; EmccNativeLaunchers now requires emcc/empp/emar/emstrip/emranlib/emnm/wasm_ld as str; WasmNativeEntries now requires c/cpp/ar/strip/ranlib/nm/wasm_ld and removes used_native_launcher.
Native launcher computation and validation
ci/meson/build_config.py
_ensure_emcc_native_launcher() computes and compiles all seven ctc-* native launcher binaries and raises RuntimeError on compile failure or missing binaries; resolve_wasm_native_entries() builds WasmNativeEntries directly from native paths.
Emscripten patch helper
ci/wasm_build.py
Adds an idempotent helper that best-effort patches the local Emscripten/clang toolchain so EMCC_WASM_LD is respected; failures are logged non-fatally.
Cross-file rendering and logging
ci/wasm_build.py
_render_wasm_cross_file() calls the patch helper, resolves native entries, sets os.environ["EMCC_WASM_LD"] when native wasm-ld is found, logs chosen ctc-em* launcher paths, and computes escaped Meson values for strip, ranlib, and nm.
Meson [binaries] generation
ci/wasm_build.py
Generated [binaries] emit strip, ranlib, and nm entries and update comments to document emcc’s internal wasm-ld invocation via EMCC_WASM_LD.
Dependency bump
pyproject.toml
Bumps clang-tool-chain dependency to >=1.5.1.
KeyboardInterrupt handling tweaks
ci/compiler/pio.py, ci/util/fbuild_runner.py
Forward KeyboardInterrupt to handle_keyboard_interrupt(ki) and re-raise in build staging/runner paths.

Sequence Diagram

sequenceDiagram
  participant WasmCrossFileGen as _render_wasm_cross_file
  participant Resolver as resolve_wasm_native_entries
  participant NativeProbe as _ensure_emcc_native_launcher
  participant Env as os.environ
  participant Meson as MesonCrossFile

  WasmCrossFileGen->>Resolver: request resolved entries (c/cpp/ar/strip/ranlib/nm/wasm_ld)
  Resolver->>NativeProbe: probe and compile ctc-em* native launchers
  NativeProbe-->>Resolver: EmccNativeLaunchers (native paths)
  Resolver-->>WasmCrossFileGen: WasmNativeEntries (native paths)
  WasmCrossFileGen->>Env: set EMCC_WASM_LD=wasm_ld (if native)
  WasmCrossFileGen->>Meson: emit [binaries] including strip/ranlib/nm values
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2489: Similar edits to EmccNativeLaunchers/resolve_wasm_native_entries() and cross-file wiring; this PR extends additional tool fields.
  • FastLED/FastLED#2487: Related changes to WASM cross-file plumbing and native vs wrapper launcher selection.

Poem

"I hopped through code to find a way,
New native tools arrive today. 🐇
wasm_ld hums while strip and friends stand by,
ranlib and nm give builds a try.
Meson sings when natives stay."

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: upgrading clang-tool-chain and wiring all 7 native WASM launchers, which aligns with the substantial refactoring across build_config.py and wasm_build.py.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wire-wasm-emstrip-emranlib-emnm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/meson/build_config.py`:
- Around line 69-71: Add runtime type validation by importing typechecked from
typeguard and applying the `@typechecked` decorator to the dataclasses that
declare the emstrip, emranlib, emnm fields (and the other dataclass around lines
88-90). Specifically, add "from typeguard import typechecked" at the top and
place `@typechecked` immediately above the existing `@dataclass` declarations for
the classes that contain those Optional[str] attributes so they perform runtime
type checking.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 00e9c2a5-901b-433b-870d-5e9008ce2181

📥 Commits

Reviewing files that changed from the base of the PR and between db7b569 and df1301c.

📒 Files selected for processing (2)
  • ci/meson/build_config.py
  • ci/wasm_build.py

Comment thread ci/meson/build_config.py Resolved
clang-tool-chain 1.5.1 (released 2026-05-19) closes both upstream
issues filed during the previous WASM optimization work:

  - #22 (ctc-wasm-ld integration): emscripten installer now patches
    shared.py to honor EMCC_WASM_LD env var, letting downstream projects
    swap in ctc-wasm-ld for the bundled linker.
  - #23 (Python wrapper parity): clang-tool-chain-emstrip, -emranlib,
    -emnm, -wasm-ld console scripts now exist, mirroring -emar/-emcc/-empp.

Changes
-------

pyproject.toml: clang-tool-chain >=1.4.0 -> >=1.5.1

ci/meson/build_config.py:
  - Add @TypeChecked decorators to EmccNativeLaunchers and
    WasmNativeEntries (matches the project-wide convention enforced
    in 5 other ci/ modules; CodeRabbit feedback on PR #2490).
  - Add wasm_ld field to both dataclasses.
  - Simplify WasmNativeEntries: strip/ranlib/nm/wasm_ld are now always
    str (Python wrapper fallback names exist in 1.5.1), no more
    Optional / omit-on-missing complexity.
  - _ensure_emcc_native_launcher: probe ctc-wasm-ld alongside the other
    six binaries.
  - resolve_wasm_native_entries: populate all fields with native paths
    when available, Python wrapper names otherwise.

ci/wasm_build.py:
  - New _ensure_emscripten_wasm_ld_patch helper: lazily calls
    ensure_emscripten_available() once per process to apply (idempotent)
    the EMCC_WASM_LD shared.py patch on the existing emscripten install.
  - _render_wasm_cross_file now sets EMCC_WASM_LD in os.environ
    pointing at the resolved wasm_ld path (native ctc-wasm-ld when
    compiled, Python wrapper otherwise). This routes emcc's internal
    wasm-ld invocation through ctc-wasm-ld for the link step.
  - Cross-file template always emits strip/ranlib/nm (Python wrapper
    fallbacks are now usable values).
  - Log resolution status for all six native launchers including
    ctc-wasm-ld.

Verification
------------

Clean WASM build of examples/Blink with native launcher cache cleared:

  [WASM] Using native ctc-emcc launcher: ...\ctc-emcc.exe
  [WASM] Using native ctc-emar launcher: ...\ctc-emar.exe
  [WASM] Using native ctc-emstrip launcher: ...\ctc-emstrip.exe
  [WASM] Using native ctc-emranlib launcher: ...\ctc-emranlib.exe
  [WASM] Using native ctc-emnm launcher: ...\ctc-emnm.exe
  [WASM] Using native ctc-wasm-ld for emcc linker: ...\ctc-wasm-ld.exe
  [WASM] Build successful!
    Total:    17.50s

The shared.py patch is confirmed in place at
~/.clang-tool-chain/emscripten/win/x86_64/emscripten/tools/shared.py:

  # CTC_EMCC_WASM_LD_PATCH: honor EMCC_WASM_LD for ctc-wasm-ld integration
  WASM_LD = os.environ.get('EMCC_WASM_LD') or llvm_tool_path('wasm-ld')

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees zackees changed the title perf(wasm): wire ctc-emstrip / ctc-emranlib / ctc-emnm native launchers perf(wasm): upgrade to clang-tool-chain 1.5.1, wire all 7 native launchers including ctc-wasm-ld May 19, 2026
zackees and others added 2 commits May 18, 2026 21:47
…1 guarantees natives

clang-tool-chain >=1.5.1 is pinned and compile_native() builds all
seven WASM launchers (clang, emcc/em++, emar, emstrip, emranlib, emnm,
wasm-ld) in one call. The Python-wrapper fallback paths were dead
weight — every successful build resolved 7-of-7 natives, and any
failure mode is better surfaced as a hard error than silent
degradation to 800ms-per-call Python wrappers.

Changes
-------

ci/meson/build_config.py:
  - EmccNativeLaunchers: all fields are str (was Optional[str]).
  - WasmNativeEntries: all fields are str (was Optional for
    strip/ranlib/nm); dropped used_native_launcher (always True now
    or function raises).
  - _ensure_emcc_native_launcher: raises RuntimeError with a
    descriptive message if compile_native() fails or any binary
    is missing afterward. No more None returns.
  - resolve_wasm_native_entries: tiny pass-through. No fallback
    construction.

ci/wasm_build.py:
  - _render_wasm_cross_file: unconditional native-launcher logging
    (one line per binary); no more "ctc-X unavailable; using Python
    wrapper" branches.

Aligns with the project guideline "Never use silent fallbacks for
missing critical resources — always fail fast with descriptive errors"
flagged by CodeRabbit on the original ctc-emcc PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The python_pipeline lint phase was failing on master with two
KeyboardInterrupt-handling violations and one type-mismatch the KBI
errors were hiding. Cleared all three so the pipeline goes green
end-to-end.

1. ci/compiler/pio.py:518 — try/except Exception without explicit
   KeyboardInterrupt handler (KBI001). Added the standard
   `except KeyboardInterrupt as ki: handle_keyboard_interrupt(ki); raise`
   ahead of the generic Exception clause. Module already imports
   handle_keyboard_interrupt.

2. ci/util/fbuild_runner.py:161 — KeyboardInterrupt handler re-raised
   without calling handle_keyboard_interrupt or _thread.interrupt_main
   (KBI002). Routed through handle_keyboard_interrupt (inline import
   to avoid adding a top-level dependency in this utility module).

3. ci/compiler/pio.py:346 — _init_platformio_build was being called
   positionally with self.additional_defines slipping into the
   build_dir slot (ty: invalid-argument-type). Switched to keyword
   arguments for all optional params so the alignment is explicit.
   This was a latent bug — the function would have failed at runtime
   if build_dir was used (e.g., for path resolution). Caught by ty
   only after the KBI lint failures stopped masking the rest of the
   python_pipeline output.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/wasm_build.py`:
- Around line 474-493: The try-except currently swallows KeyboardInterrupt;
modify the block so KeyboardInterrupt is handled before the broad Exception: add
an except KeyboardInterrupt: raise to re-raise the interrupt, then keep the
existing except Exception as e: print(...) fallback that sets/mentions
_emscripten_patch_applied and the EMCC_WASM_LD patch attempt log; locate the try
that calls ensure_emscripten_available and adjust the exception handlers
accordingly so user Ctrl+C will propagate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9cc04d42-fec9-4d85-9ba6-71ab8d53cc36

📥 Commits

Reviewing files that changed from the base of the PR and between b539ae8 and afeeb91.

📒 Files selected for processing (2)
  • ci/meson/build_config.py
  • ci/wasm_build.py

Comment thread ci/wasm_build.py
Comment on lines +474 to +493
try:
import platform as _platform_mod

from clang_tool_chain.installers.emscripten import ensure_emscripten_available

system = _platform_mod.system().lower()
platform_name = (
"win"
if system == "windows"
else ("darwin" if system == "darwin" else "linux")
)
machine = _platform_mod.machine().lower()
arch = "x86_64" if machine in ("x86_64", "amd64") else "arm64"
ensure_emscripten_available(platform_name, arch)
_emscripten_patch_applied = True
except Exception as e:
# Patch is best-effort. Without it, EMCC_WASM_LD is ignored and emcc
# falls back to the bundled wasm-ld — the build still works, just
# without the ctc-wasm-ld speedup on link.
print(f"[WASM] EMCC_WASM_LD patch attempt failed (non-fatal): {e}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Handle KeyboardInterrupt before catching generic Exception.

The try-except block catches all exceptions including KeyboardInterrupt, preventing users from cancelling the operation with Ctrl+C. While the patch is best-effort, KeyboardInterrupt should propagate to allow user cancellation.

🐛 Proposed fix
     try:
         import platform as _platform_mod

         from clang_tool_chain.installers.emscripten import ensure_emscripten_available

         system = _platform_mod.system().lower()
         platform_name = (
             "win"
             if system == "windows"
             else ("darwin" if system == "darwin" else "linux")
         )
         machine = _platform_mod.machine().lower()
         arch = "x86_64" if machine in ("x86_64", "amd64") else "arm64"
         ensure_emscripten_available(platform_name, arch)
         _emscripten_patch_applied = True
+    except KeyboardInterrupt:
+        raise
     except Exception as e:
         # Patch is best-effort. Without it, EMCC_WASM_LD is ignored and emcc
         # falls back to the bundled wasm-ld — the build still works, just
         # without the ctc-wasm-ld speedup on link.
         print(f"[WASM] EMCC_WASM_LD patch attempt failed (non-fatal): {e}")

As per coding guidelines, "All Python try-catch blocks must handle KeyboardInterrupt before other exceptions".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
try:
import platform as _platform_mod
from clang_tool_chain.installers.emscripten import ensure_emscripten_available
system = _platform_mod.system().lower()
platform_name = (
"win"
if system == "windows"
else ("darwin" if system == "darwin" else "linux")
)
machine = _platform_mod.machine().lower()
arch = "x86_64" if machine in ("x86_64", "amd64") else "arm64"
ensure_emscripten_available(platform_name, arch)
_emscripten_patch_applied = True
except Exception as e:
# Patch is best-effort. Without it, EMCC_WASM_LD is ignored and emcc
# falls back to the bundled wasm-ld — the build still works, just
# without the ctc-wasm-ld speedup on link.
print(f"[WASM] EMCC_WASM_LD patch attempt failed (non-fatal): {e}")
try:
import platform as _platform_mod
from clang_tool_chain.installers.emscripten import ensure_emscripten_available
system = _platform_mod.system().lower()
platform_name = (
"win"
if system == "windows"
else ("darwin" if system == "darwin" else "linux")
)
machine = _platform_mod.machine().lower()
arch = "x86_64" if machine in ("x86_64", "amd64") else "arm64"
ensure_emscripten_available(platform_name, arch)
_emscripten_patch_applied = True
except KeyboardInterrupt:
raise
except Exception as e:
# Patch is best-effort. Without it, EMCC_WASM_LD is ignored and emcc
# falls back to the bundled wasm-ld — the build still works, just
# without the ctc-wasm-ld speedup on link.
print(f"[WASM] EMCC_WASM_LD patch attempt failed (non-fatal): {e}")
🧰 Tools
🪛 Ruff (0.15.13)

[warning] 489-489: Do not catch blind exception: Exception

(BLE001)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/wasm_build.py` around lines 474 - 493, The try-except currently swallows
KeyboardInterrupt; modify the block so KeyboardInterrupt is handled before the
broad Exception: add an except KeyboardInterrupt: raise to re-raise the
interrupt, then keep the existing except Exception as e: print(...) fallback
that sets/mentions _emscripten_patch_applied and the EMCC_WASM_LD patch attempt
log; locate the try that calls ensure_emscripten_available and adjust the
exception handlers accordingly so user Ctrl+C will propagate.

@zackees
zackees merged commit 76e5a94 into master May 19, 2026
7 of 8 checks passed
@zackees
zackees deleted the wire-wasm-emstrip-emranlib-emnm branch May 19, 2026 05:19
zackees added a commit that referenced this pull request May 30, 2026
…ndler (#2586)

The try/except around ensure_emscripten_available() catches Exception
broadly. While KeyboardInterrupt is not Exception (so Ctrl-C does
propagate in practice), the repo guideline is to make the re-raise
explicit. Adds `except KeyboardInterrupt: raise` before the existing
`except Exception as e:` handler.

Addresses CodeRabbit finding D2 from meta #2580 (originally #2490).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant