diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-01-10 00:51:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-10 00:51:02 -0700 |
| commit | 3051d4390b0db3ed6669e8d17fb45edc26ff6fbd (patch) | |
| tree | be832a632cd2b341f3442285ac288dc8cdaa5268 /src | |
| parent | e025ad7b46e3be08e17e70444f909d351ddc6718 (diff) | |
| download | zig-3051d4390b0db3ed6669e8d17fb45edc26ff6fbd.tar.gz zig-3051d4390b0db3ed6669e8d17fb45edc26ff6fbd.zip | |
Compilation: fix tsan error reporting
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 9dd45d8ced..fdc7d08e98 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3759,13 +3759,14 @@ fn processOneJob(comp: *Compilation, job: Job, prog_node: *std.Progress.Node) !v const named_frame = tracy.namedFrame("libtsan"); defer named_frame.end(); - libtsan.buildTsan(comp, prog_node) catch |err| { - // TODO Surface more error details. - comp.lockAndSetMiscFailure( + libtsan.buildTsan(comp, prog_node) catch |err| switch (err) { + error.OutOfMemory => return error.OutOfMemory, + error.SubCompilationFailed => return, // error reported already + else => comp.lockAndSetMiscFailure( .libtsan, "unable to build TSAN library: {s}", .{@errorName(err)}, - ); + ), }; }, .wasi_libc_crt_file => |crt_file| { |
