File tree Expand file tree Collapse file tree 4 files changed +555
-9
lines changed
ci/docker/wasm32-unknown-wasi Expand file tree Collapse file tree 4 files changed +555
-9
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ RUN mv /clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04 /wasmcc
2828# those breaking changes on `libc`'s own CI
2929RUN git clone https://github.com/CraneStation/wasi-sysroot && \
3030 cd wasi-sysroot && \
31- git reset --hard e5f14be38362f1ab83302895a6e74b2ffd0e2302
31+ git reset --hard 2201343c17b7149a75f543f523bea0c3243c6091
3232RUN make -C wasi-sysroot install -j $(nproc) WASM_CC=/wasmcc/bin/clang INSTALL_DIR=/wasi-sysroot
3333
3434# This is a small wrapper script which executes the actual clang binary in
Original file line number Diff line number Diff line change @@ -1875,17 +1875,28 @@ fn test_wasi(target: &str) {
18751875 cfg. define ( "_GNU_SOURCE" , None ) ;
18761876
18771877 headers ! { cfg:
1878+ "ctype.h" ,
1879+ "dirent.h" ,
18781880 "errno.h" ,
18791881 "fcntl.h" ,
18801882 "limits.h" ,
18811883 "locale.h" ,
18821884 "malloc.h" ,
1885+ "poll.h" ,
1886+ "stdbool.h" ,
18831887 "stddef.h" ,
18841888 "stdint.h" ,
18851889 "stdio.h" ,
18861890 "stdlib.h" ,
1891+ "string.h" ,
1892+ "sys/resource.h" ,
1893+ "sys/select.h" ,
1894+ "sys/socket.h" ,
18871895 "sys/stat.h" ,
1896+ "sys/times.h" ,
18881897 "sys/types.h" ,
1898+ "sys/uio.h" ,
1899+ "sys/utsname.h" ,
18891900 "time.h" ,
18901901 "unistd.h" ,
18911902 "wasi/core.h" ,
@@ -1895,7 +1906,7 @@ fn test_wasi(target: &str) {
18951906 }
18961907
18971908 cfg. type_name ( move |ty, is_struct, is_union| match ty {
1898- "FILE" => ty. to_string ( ) ,
1909+ "FILE" | "fd_set" | "DIR" => ty. to_string ( ) ,
18991910 t if is_union => format ! ( "union {}" , t) ,
19001911 t if t. starts_with ( "__wasi" ) && t. ends_with ( "_u" ) => {
19011912 format ! ( "union {}" , t)
@@ -1920,5 +1931,9 @@ fn test_wasi(target: &str) {
19201931 // import the same thing but have different function pointers
19211932 cfg. skip_fn_ptrcheck ( |f| f. starts_with ( "__wasi" ) ) ;
19221933
1934+ // d_name is declared as a flexible array in WASI libc, so it
1935+ // doesn't support sizeof.
1936+ cfg. skip_field ( |s, field| s == "dirent" && field == "d_name" ) ;
1937+
19231938 cfg. generate ( "../src/lib.rs" , "main.rs" ) ;
19241939}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ cfg_if! {
112112 } else if #[ cfg( all( target_env = "sgx" , target_vendor = "fortanix" ) ) ] {
113113 mod sgx;
114114 pub use sgx:: * ;
115- } else if #[ cfg( target_env = "wasi" ) ] {
115+ } else if #[ cfg( any ( target_env = "wasi" , target_os = "wasi" ) ) ] {
116116 mod wasi;
117117 pub use wasi:: * ;
118118 } else {
You can’t perform that action at this time.
0 commit comments