Skip to content

Commit 6e29584

Browse files
wasm: don't include stdint.h for __wasi__
because wasi-libc's `stdint.h` is highjacked by libcxx's `stdint.h` tries to load the next `stdint.h` and it results in loading whole `std` C++ standard library. However, loading whole std during building Swift stdlib through SwiftShims causes cyclic reference among Swift stdlib types and libc.
1 parent 087e5a9 commit 6e29584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/SwiftShims/swift/shims/SwiftStdint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// Clang has been defining __INTxx_TYPE__ macros for a long time.
2626
// __UINTxx_TYPE__ are defined only since Clang 3.5.
27-
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__)
27+
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__) && !defined(__wasi__)
2828
#include <stdint.h>
2929
typedef int64_t __swift_int64_t;
3030
typedef uint64_t __swift_uint64_t;

0 commit comments

Comments
 (0)