diff --git a/Makefile.pre.in b/Makefile.pre.in index f869c1f7c93776..9d30a9e42ad24c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3198,7 +3198,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 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