| ... | ... | @@ -113,11 +113,13 @@ pub fn buildLibCXX(comp: *Compilation) !void { |
| 113 | 113 | for (libcxx_files) |cxx_src| { |
| 114 | 114 | var cflags = std.ArrayList([]const u8).init(arena); |
| 115 | 115 | |
| 116 | | if (target.os.tag == .windows) { |
| 117 | | // Filesystem stuff isn't supported on Windows. |
| 116 | if (target.os.tag == .windows or target.os.tag == .wasi) { |
| 117 | // Filesystem stuff isn't supported on Windows and WASI. |
| 118 | 118 | if (std.mem.startsWith(u8, cxx_src, "src/filesystem/")) |
| 119 | 119 | continue; |
| 120 | | } else { |
| 120 | } |
| 121 | |
| 122 | if (target.os.tag != .windows) { |
| 121 | 123 | if (std.mem.startsWith(u8, cxx_src, "src/support/win32/")) |
| 122 | 124 | continue; |
| 123 | 125 | } |
| ... | ... | @@ -133,7 +135,7 @@ pub fn buildLibCXX(comp: *Compilation) !void { |
| 133 | 135 | try cflags.append("-fvisibility=hidden"); |
| 134 | 136 | try cflags.append("-fvisibility-inlines-hidden"); |
| 135 | 137 | |
| 136 | | if (target.abi.isMusl()) { |
| 138 | if (target.abi.isMusl() or target.os.tag == .wasi) { |
| 137 | 139 | try cflags.append("-D_LIBCPP_HAS_MUSL_LIBC"); |
| 138 | 140 | } |
| 139 | 141 | |
| ... | ... | @@ -252,7 +254,7 @@ pub fn buildLibCXXABI(comp: *Compilation) !void { |
| 252 | 254 | try cflags.append("-fvisibility=hidden"); |
| 253 | 255 | try cflags.append("-fvisibility-inlines-hidden"); |
| 254 | 256 | |
| 255 | | if (target.abi.isMusl()) { |
| 257 | if (target.abi.isMusl() or target.os.tag == .wasi) { |
| 256 | 258 | try cflags.append("-D_LIBCPP_HAS_MUSL_LIBC"); |
| 257 | 259 | } |
| 258 | 260 | |