From 9cf667a21bfef3660183ed67baacb5b32c0f06e2 Mon Sep 17 00:00:00 2001 From: John Schmidt Date: Sun, 21 Aug 2022 18:12:13 +0200 Subject: [PATCH] Enable unexpectedErrno error tracing for stage2 LLVM Stage2 seems to be able to handle this now. --- lib/std/os.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/std/os.zig b/lib/std/os.zig index c757561b07..24b438a53e 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -5447,11 +5447,7 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 { /// if this happens the fix is to add the error code to the corresponding /// switch expression, possibly introduce a new error in the error set, and /// send a patch to Zig. -/// The self-hosted compiler is not fully capable of handle the related code. -/// Until then, unexpected error tracing is disabled for the self-hosted compiler. -/// TODO remove this once self-hosted is capable enough to handle printing and -/// stack trace dumping. -pub const unexpected_error_tracing = builtin.zig_backend == .stage1 and builtin.mode == .Debug; +pub const unexpected_error_tracing = (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and builtin.mode == .Debug; pub const UnexpectedError = error{ /// The Operating System returned an undocumented error code.