From c0e54a0bdc8c8869091365ecce4326ce4b30df04 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 12 Nov 2024 00:48:08 +0000 Subject: [PATCH] Bug 1927242 - Update wasi-libc build-time check for latest LLVM trunk. r=firefox-build-system-reviewers,ahochheiden Submitted upstream at https://github.com/WebAssembly/wasi-libc/pull/546 Differential Revision: https://phabricator.services.mozilla.com/D228232 --- taskcluster/scripts/misc/wasi-sdk.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/taskcluster/scripts/misc/wasi-sdk.patch b/taskcluster/scripts/misc/wasi-sdk.patch index 759d6e7a5af3..2a8d307a723c 100644 --- a/taskcluster/scripts/misc/wasi-sdk.patch +++ b/taskcluster/scripts/misc/wasi-sdk.patch @@ -42,7 +42,7 @@ index f350ecb..3b73115 100644 grep '^_*imported_wasi_' "$(UNDEFINED_SYMBOLS)" \ > "$(SYSROOT_LIB)/libc.imports" -@@ -671,10 +671,18 @@ check-symbols: startup_files libc +@@ -671,10 +671,20 @@ check-symbols: startup_files libc @# @# TODO: Filter out __NO_MATH_ERRNO_ and a few __*WIDTH__ that are new to clang 14. @# TODO: Filter out __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* that are new to clang 16. @@ -58,19 +58,23 @@ index f350ecb..3b73115 100644 @# clang 16 for -mcpu=generic. + @# TODO: Undefine __wasm_multivalue__ and __wasm_reference_types__, that are new to + @# clang 19 for -mcpu=generic. ++ @# TODO: Undefine __wasm_nontrapping_fptoint__ and __wasm_bulk_memory__, that are ++ @# new to clang 20. @# TODO: As of clang 16, __GNUC_VA_LIST is #defined without a value. $(CC) $(CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \ -isystem $(SYSROOT_INC) \ -@@ -691,6 +698,8 @@ check-symbols: startup_files libc +@@ -691,6 +700,10 @@ check-symbols: startup_files libc -U__clang_wide_literal_encoding__ \ -U__wasm_mutable_globals__ \ -U__wasm_sign_ext__ \ + -U__wasm_multivalue__ \ + -U__wasm_reference_types__ \ ++ -U__wasm_nontrapping_fptoint__ \ ++ $(if $(filter-out wasm32-wasi-threads,$(TARGET_TRIPLE)),-U__wasm_bulk_memory__) \ -U__GNUC__ \ -U__GNUC_MINOR__ \ -U__GNUC_PATCHLEVEL__ \ -@@ -702,6 +712,12 @@ check-symbols: startup_files libc +@@ -702,6 +716,12 @@ check-symbols: startup_files libc | sed -e 's/__GNUC_VA_LIST $$/__GNUC_VA_LIST 1/' \ | grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \ | grep -v '^#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_\(1\|2\|4\|8\)' \