From 3a54dd23b8099aa1f39b29500b9148312c9b9d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Tue, 14 Apr 2026 16:56:10 +0200 Subject: [PATCH 1/2] Makefile.pre.in: use em-config for trampoline clang When CC is wrapped by ccache, the Emscripten trampoline rule cannot derive the matching clang path by treating CC as a single executable path. Query the active LLVM toolchain path with em-config instead. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 8d325a4932509d..43076fa6982614 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3173,7 +3173,7 @@ Python/asm_trampoline.o: $(srcdir)/Python/asm_trampoline.S Python/emscripten_trampoline_inner.wasm: $(srcdir)/Python/emscripten_trampoline_inner.c # emcc has a path that ends with emsdk/upstream/emscripten/emcc, we're looking for emsdk/upstream/bin/clang. - $$(dirname $$(dirname $(CC)))/bin/clang -o $@ $< -mgc -O2 -Wl,--no-entry -Wl,--import-table -Wl,--import-memory -target wasm32-unknown-unknown -nostdlib + $$(em-config LLVM_ROOT)/clang -o $@ $< -mgc -O2 -Wl,--no-entry -Wl,--import-table -Wl,--import-memory -target wasm32-unknown-unknown -nostdlib Python/emscripten_trampoline_wasm.c: Python/emscripten_trampoline_inner.wasm $(PYTHON_FOR_REGEN) $(srcdir)/Platforms/emscripten/prepare_external_wasm.py $< $@ getWasmTrampolineModule From 166dd8c37d3e66449495832393fe1dad1b6b8637 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 06:50:04 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Build/2026-04-23-06-50-03.gh-issue-148557.QpWg1H.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Build/2026-04-23-06-50-03.gh-issue-148557.QpWg1H.rst diff --git a/Misc/NEWS.d/next/Build/2026-04-23-06-50-03.gh-issue-148557.QpWg1H.rst b/Misc/NEWS.d/next/Build/2026-04-23-06-50-03.gh-issue-148557.QpWg1H.rst new file mode 100644 index 00000000000000..a3a77c88b2991d --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-04-23-06-50-03.gh-issue-148557.QpWg1H.rst @@ -0,0 +1 @@ +Improve build with Emscripten