Skip to content

Commit 38b930a

Browse files
authored
Fix -std=gnu17 when generating predefined_macros.txt (#187)
* 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
1 parent 42e6901 commit 38b930a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ finish: startup_files libc
480480
# TODO: Filter out __FLT16_* for now, as not all versions of clang have these.
481481
"$(WASM_CC)" $(WASM_CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
482482
-isystem $(SYSROOT_INC) \
483+
-std=gnu17 \
483484
-E -dM -Wno-\#warnings \
484485
-D_ALL_SOURCE \
485486
-U__llvm__ \

expected/wasm32-wasi/predefined-macros.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2774,7 +2774,7 @@
27742774
#define __STDC_ISO_10646__ 201206L
27752775
#define __STDC_UTF_16__ 1
27762776
#define __STDC_UTF_32__ 1
2777-
#define __STDC_VERSION__ 201112L
2777+
#define __STDC_VERSION__ 201710L
27782778
#define __STDC__ 1
27792779
#define __STDDEF_H
27802780
#define __UAPI_DEF_IN6_ADDR 0

0 commit comments

Comments
 (0)