Bug 1903956 - Update wasi-libc build-time check for latest LLVM trunk. r=firefox-build-system-reviewers,sergesanspaille

Submitted upstream at https://github.com/WebAssembly/wasi-libc/pull/509.

Differential Revision: https://phabricator.services.mozilla.com/D214492
This commit is contained in:
Mike Hommey 2024-06-24 21:17:47 +00:00
parent 555d48666b
commit 34135614ad

View File

@ -42,7 +42,7 @@ index f350ecb..3b73115 100644
grep '^_*imported_wasi_' "$(UNDEFINED_SYMBOLS)" \
> "$(SYSROOT_LIB)/libc.imports"
@@ -671,10 +671,16 @@ check-symbols: startup_files libc
@@ -671,10 +671,17 @@ 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.
@ -50,6 +50,7 @@ index f350ecb..3b73115 100644
+ @# TODO: Filter out __FLT128_* that are new to clang 18.
+ @# TODO: Filter out __MEMORY_SCOPE_* that are new to clang 18.
+ @# TODO: Filter out __GCC_(CON|DE)STRUCTIVE_SIZE that are new to clang 19.
+ @# TODO: Filter out __STDC_EMBED_* that are new to clang 19.
@# TODO: clang defined __FLT_EVAL_METHOD__ until clang 15, so we force-undefine it
@# for older versions.
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
@ -68,7 +69,7 @@ index f350ecb..3b73115 100644
-U__GNUC__ \
-U__GNUC_MINOR__ \
-U__GNUC_PATCHLEVEL__ \
@@ -702,6 +710,10 @@ check-symbols: startup_files libc
@@ -702,6 +711,11 @@ 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\)' \
@ -76,6 +77,7 @@ index f350ecb..3b73115 100644
+ | grep -v '^#define __FLT128_' \
+ | grep -v '^#define __MEMORY_SCOPE_' \
+ | grep -v '^#define __GCC_\(CON\|DE\)STRUCTIVE_SIZE' \
+ | grep -v '^#define __STDC_EMBED_' \
> "$(SYSROOT_SHARE)/predefined-macros.txt"
# Check that the computed metadata matches the expected metadata.