Skip to content

Commit 8df0d4c

Browse files
sbc100sunfishcode
authored andcommitted
Fix predefined macros check after recent clang change
This is an alternative to #75.
1 parent a413650 commit 8df0d4c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,15 @@ finish: startup_files libc
467467
# which we don't need to track here. For the __*_ATOMIC_*_LOCK_FREE
468468
# macros, squash individual compiler names to attempt, toward keeping
469469
# these files compiler-independent.
470+
#
471+
# We have to add `-isystem $(SYSROOT_INC)` because otherwise clang puts
472+
# its builtin include path first, which produces compiler-specific
473+
# output.
474+
#
470475
# TODO: Undefine __FLOAT128__ for now since it's not in clang 8.0.
471476
# TODO: Filter out __FLT16_* for now, as not all versions of clang have these.
472477
"$(WASM_CC)" $(WASM_CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
478+
-isystem $(SYSROOT_INC) \
473479
-E -dM -Wno-\#warnings \
474480
-D_ALL_SOURCE \
475481
-U__llvm__ \

0 commit comments

Comments
 (0)