v1.5.2 — Windows zccache em++/emcc hotfix
Hotfix for #29.
What was broken
In 1.5.1 on Windows, clang-tool-chain-em-cpp / -emcc / -zccache-em-cpp / -zccache-emcc all failed with:
zccache: failed to run em++.py: %1 is not a valid Win32 application. (os error 193)
The baked profile.json pointed at .py paths; Windows CreateProcess can't exec a Python script directly (no shebang support).
What changed
Three layered fixes — minimum needed for both fresh installs and existing 1.5.0 / 1.5.1 deployments:
profile.py: bake the right entry point per platform.- Windows →
emcc.bat/em++.bat(the wrapper Emscripten ships; cmd.exe handlespython emcc.py) - POSIX →
emcc/em++(shebang scripts that exec directly)
- Windows →
zccache_shim._resolve_tool_path: for back-compat with 1.5.0 / 1.5.1 profiles that already baked.pypaths, rewrite to the sibling.batat exec time on Windows. Existing installs auto-recover — no reinstall required. If no.batfallback exists, fail with a clear error instead of the cryptic Win32 message.exec_via_zccache: fortool in {emcc, em++, wasm-ld}, setEM_CONFIG/EMSCRIPTEN/EMSCRIPTEN_ROOTenv, prepend<emsdk>/binto PATH for llvm-* discovery, and skip host-ABI flag injection (these tools are wasm-targeted;--target=*-windows-gnuetc. are wrong).
Verification
The exact repro from #29 now passes:
clang-tool-chain-em-cpp -c t.cpp -o t.o -O0 # rc=0, 540-byte .o produced8 new regression tests (2 unit + 6 entry-point integration). 138 tests across the broader emscripten + version suites. Lint green.
Install
pip install --upgrade clang-tool-chainUsers on 1.5.1 are recommended to upgrade. Users on 1.5.0 / 1.5.1 who don't upgrade will still get the shim's .py → .bat back-compat path the next time they run clang-tool-chain install ... (which rebakes profile.json) — but the shim fix is only in 1.5.2+, so you need to upgrade the package itself to get it.
🤖 Generated with Claude Code