| ... | ... | @@ -139,9 +139,8 @@ pub fn buildLibCXX(comp: *Compilation) !void { |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | if (target.os.tag == .wasi) { |
| 142 | | // WASI doesn't support thread yet. |
| 142 | // WASI doesn't support thread and exception yet. |
| 143 | 143 | try cflags.append("-D_LIBCPP_HAS_NO_THREADS"); |
| 144 | | // Also, exception is not supported yet. |
| 145 | 144 | try cflags.append("-fno-exceptions"); |
| 146 | 145 | } |
| 147 | 146 | |
| ... | ... | @@ -253,13 +252,12 @@ pub fn buildLibCXXABI(comp: *Compilation) !void { |
| 253 | 252 | var cflags = std.ArrayList([]const u8).init(arena); |
| 254 | 253 | |
| 255 | 254 | if (target.os.tag == .wasi) { |
| 256 | | // WASI doesn't support thread yet. |
| 255 | // WASI doesn't support thread and exception yet. |
| 257 | 256 | if (std.mem.startsWith(u8, cxxabi_src, "src/cxa_thread_atexit.cpp") or |
| 258 | 257 | std.mem.startsWith(u8, cxxabi_src, "src/cxa_exception.cpp") or |
| 259 | 258 | std.mem.startsWith(u8, cxxabi_src, "src/cxa_personality.cpp")) |
| 260 | 259 | continue; |
| 261 | 260 | try cflags.append("-D_LIBCXXABI_HAS_NO_THREADS"); |
| 262 | | // Also, exception is not supported yet. |
| 263 | 261 | try cflags.append("-fno-exceptions"); |
| 264 | 262 | } else { |
| 265 | 263 | try cflags.append("-DHAVE___CXA_THREAD_ATEXIT_IMPL"); |