Skip to content

Commit

Permalink
Bug 1927242 - Update wasi-libc build-time check for latest LLVM trunk…
Browse files Browse the repository at this point in the history
…. r=firefox-build-system-reviewers,ahochheiden

Submitted upstream at WebAssembly/wasi-libc#546

Differential Revision: https://phabricator.services.mozilla.com/D228232

UltraBlame original commit: 9a4d10439e8016ab83773c94681e1b5c8ac5b5c2
  • Loading branch information
marco-c committed Nov 16, 2024
1 parent 71ba745 commit ad8b473
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions taskcluster/scripts/misc/wasi-sdk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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\)' \
Expand Down

0 comments on commit ad8b473

Please sign in to comment.