Skip to content

Commit 8279f95

Browse files
authored
Exclude setjmp runtime from LTO (#529)
This fixes errors like: ``` wasm-ld: error: /Volumes/PortableSSD/git/wasi-sdk/build/install/bin/../share/wasi-sysroot/lib/wasm32-wasi/llvm-lto/19.1.0-wasi-sdk/libsetjmp.a(rt.o): attempt to add bitcode file after LTO (__wasm_longjmp) ``` Note: Any symbol that the compiler might generate at bitcode compile time either need to be unconditionally included at LTO time, or not built as LTO. This is because LTO object files cannot be added to the link after LTO time.
1 parent 230d4be commit 8279f95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ LIBC_TOP_HALF_MUSL_SOURCES = \
264264
LIBC_NONLTO_SOURCES = \
265265
$(addprefix $(LIBC_TOP_HALF_MUSL_SRC_DIR)/, \
266266
exit/atexit.c \
267+
setjmp/wasm32/rt.c \
267268
)
268269

269270
ifeq ($(WASI_SNAPSHOT), p2)

0 commit comments

Comments
 (0)