Skip to content

Commit

Permalink
Adjust Makefile for LLVM trunk (16) as of 2022-10-25
Browse files Browse the repository at this point in the history
llvm/llvm-project@1e4e243
enabled sign-ext and mutable-globals by default, which adds
corresponding __wasm_-prefixed #defines.
  • Loading branch information
glandium committed Oct 26, 2022
1 parent 21d93b9 commit 89222e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ check-symbols: startup_files libc
@# TODO: Filter out __NO_MATH_ERRNO_ and a few __*WIDTH__ that are new to clang 14.
@# 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
@# clang 16 for -mcpu=generic.
$(CC) $(CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
-isystem $(SYSROOT_INC) \
-std=gnu17 \
Expand All @@ -645,6 +647,8 @@ check-symbols: startup_files libc
-U__clang_version__ \
-U__clang_literal_encoding__ \
-U__clang_wide_literal_encoding__ \
-U__wasm_mutable_globals__ \
-U__wasm_sign_ext__ \
-U__GNUC__ \
-U__GNUC_MINOR__ \
-U__GNUC_PATCHLEVEL__ \
Expand Down
2 changes: 0 additions & 2 deletions expected/wasm32-wasi/posix/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3099,8 +3099,6 @@
#define __wasm__ 1
#define __wasm_atomics__ 1
#define __wasm_bulk_memory__ 1
#define __wasm_mutable_globals__ 1
#define __wasm_sign_ext__ 1
#define _tolower(a) ((a)|0x20)
#define _toupper(a) ((a)&0x5f)
#define acos(x) __tg_real_complex(acos, (x))
Expand Down

0 comments on commit 89222e0

Please sign in to comment.