From 393e614ba4650aede69a999088c012737e9435e9 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 23 Aug 2024 15:36:36 +0900 Subject: [PATCH] Exclude setjmp runtime from LTO 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) ``` --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 39a16b14..f06bd75c 100644 --- a/Makefile +++ b/Makefile @@ -264,6 +264,7 @@ LIBC_TOP_HALF_MUSL_SOURCES = \ LIBC_NONLTO_SOURCES = \ $(addprefix $(LIBC_TOP_HALF_MUSL_SRC_DIR)/, \ exit/atexit.c \ + setjmp/wasm32/rt.c \ ) ifeq ($(WASI_SNAPSHOT), p2)