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