Skip to content

Commit e57def3

Browse files
committed
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 Emscripten root with em-config instead.
1 parent 52a7f1b commit e57def3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3173,7 +3173,7 @@ Python/asm_trampoline.o: $(srcdir)/Python/asm_trampoline.S
31733173

31743174
Python/emscripten_trampoline_inner.wasm: $(srcdir)/Python/emscripten_trampoline_inner.c
31753175
# emcc has a path that ends with emsdk/upstream/emscripten/emcc, we're looking for emsdk/upstream/bin/clang.
3176-
$$(dirname $$(dirname $(CC)))/bin/clang -o $@ $< -mgc -O2 -Wl,--no-entry -Wl,--import-table -Wl,--import-memory -target wasm32-unknown-unknown -nostdlib
3176+
$$(em-config EMSCRIPTEN_ROOT)/bin/clang -o $@ $< -mgc -O2 -Wl,--no-entry -Wl,--import-table -Wl,--import-memory -target wasm32-unknown-unknown -nostdlib
31773177

31783178
Python/emscripten_trampoline_wasm.c: Python/emscripten_trampoline_inner.wasm
31793179
$(PYTHON_FOR_REGEN) $(srcdir)/Platforms/emscripten/prepare_external_wasm.py $< $@ getWasmTrampolineModule

0 commit comments

Comments
 (0)