Skip to content

Commit 129ee9b

Browse files
authored
Adjust Makefile for LLVM trunk (19) as of 2024-04-30 (#493)
llvm/llvm-project@5bbf1ea added __wasm_multivalue__ and __wasm_reference_types__, and the latter also makes libraries reference the undefined __indirect_function_table symbol, which is provided by the linker.
1 parent 13ed980 commit 129ee9b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ check-symbols: startup_files libc
836836
for undef_sym in $$("$(NM)" --undefined-only "$(SYSROOT_LIB)"/libc.a "$(SYSROOT_LIB)"/libc-*.a "$(SYSROOT_LIB)"/*.o \
837837
|grep ' U ' |sed 's/.* U //' |LC_ALL=C sort |uniq); do \
838838
grep -q '\<'$$undef_sym'\>' "$(DEFINED_SYMBOLS)" || echo $$undef_sym; \
839-
done | grep -E -v "^__mul|__memory_base" > "$(UNDEFINED_SYMBOLS)"
839+
done | grep -E -v "^__mul|__memory_base|__indirect_function_table" > "$(UNDEFINED_SYMBOLS)"
840840
grep '^_*imported_wasi_' "$(UNDEFINED_SYMBOLS)" \
841841
> "$(SYSROOT_LIB)/libc.imports"
842842

@@ -878,6 +878,8 @@ check-symbols: startup_files libc
878878
@# for older versions.
879879
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
880880
@# clang 16 for -mcpu=generic.
881+
@# TODO: Undefine __wasm_multivalue__ and __wasm_reference_types__, that are new to
882+
@# clang 19 for -mcpu=generic.
881883
@# TODO: As of clang 16, __GNUC_VA_LIST is #defined without a value.
882884
$(CC) $(CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
883885
-isystem $(SYSROOT_INC) \
@@ -894,6 +896,8 @@ check-symbols: startup_files libc
894896
-U__clang_wide_literal_encoding__ \
895897
-U__wasm_mutable_globals__ \
896898
-U__wasm_sign_ext__ \
899+
-U__wasm_multivalue__ \
900+
-U__wasm_reference_types__ \
897901
-U__GNUC__ \
898902
-U__GNUC_MINOR__ \
899903
-U__GNUC_PATCHLEVEL__ \

0 commit comments

Comments
 (0)