File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ else()
3434 add_custom_target (engine)
3535endif ()
3636
37+ # All tests are compiled against the wasi-libc sysroot
38+ add_compile_options (--sysroot ${SYSROOT} )
39+ add_link_options (--sysroot ${SYSROOT} )
40+
3741# ========= libc-test defined tests =============================
3842
3943function (add_wasilibc_flags target )
@@ -295,6 +299,7 @@ add_wasilibc_test(seekdir.c FS FAILP3)
295299add_wasilibc_test(usleep.c)
296300add_wasilibc_test(nanosleep.c)
297301add_wasilibc_test(write.c FS FAILP3)
302+ add_wasilibc_test(wasi-defines.c)
298303
299304if (TARGET_TRIPLE MATCHES "-threads" )
300305 add_wasilibc_test(busywait.c)
Original file line number Diff line number Diff line change 1+ #include <wasi/version.h>
2+
3+ int main () {
4+ #if defined(__wasip1__ ) || defined(__wasip2__ ) || defined(__wasip3__ )
5+ return 0 ;
6+ #else
7+ #error "Expected a wasi #define"
8+ return 1 ;
9+ #endif
10+ }
You can’t perform that action at this time.
0 commit comments