Skip to content

Commit

Permalink
Fix -std=gnu17 when generating predefined_macros.txt (#187)
Browse files Browse the repository at this point in the history
* Fix -std=gnu11 when generating predefined_macros.txt

The default recently changed in upstream clang:
https://reviews.llvm.org/D75383

We want to be immune to such things when generating this list so that
we can build wasi-libc with any recent clang version.

* 17
  • Loading branch information
sbc100 authored Mar 18, 2020
1 parent 42e6901 commit 38b930a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ finish: startup_files libc
# TODO: Filter out __FLT16_* for now, as not all versions of clang have these.
"$(WASM_CC)" $(WASM_CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
-isystem $(SYSROOT_INC) \
-std=gnu17 \
-E -dM -Wno-\#warnings \
-D_ALL_SOURCE \
-U__llvm__ \
Expand Down
2 changes: 1 addition & 1 deletion expected/wasm32-wasi/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,7 @@
#define __STDC_ISO_10646__ 201206L
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_VERSION__ 201112L
#define __STDC_VERSION__ 201710L
#define __STDC__ 1
#define __STDDEF_H
#define __UAPI_DEF_IN6_ADDR 0
Expand Down

0 comments on commit 38b930a

Please sign in to comment.