authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-12-18 00:57:23+01:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-12-21 01:41:50+01:00
log28bcd7dbdda7fb2c2fe80dbdb5981479a04e973a
treed11070280073293b7ffc2043cedc83c87ff7260e
parent138f85bf258d3520591e4a5abfb6d5db7ae45d97

os: disable unexpected error tracing on stage 2 builds

The self-hosted compiler cannot yet deal with the print function that this field enables. It is not critical, however, and allows us to remove formatting from the list of neccesary features to implement to get the page allocator working.

1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/os.zig+5-1
...@@ -4968,7 +4968,11 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 {...@@ -4968,7 +4968,11 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 {
4968/// if this happens the fix is to add the error code to the corresponding4968/// if this happens the fix is to add the error code to the corresponding
4969/// switch expression, possibly introduce a new error in the error set, and4969/// switch expression, possibly introduce a new error in the error set, and
4970/// send a patch to Zig.4970/// send a patch to Zig.
4971pub const unexpected_error_tracing = builtin.mode == .Debug;4971/// The self-hosted compiler is not fully capable of handle the related code.
4972/// Until then, unexpected error tracing is disabled for the self-hosted compiler.
4973/// TODO remove this once self-hosted is capable enough to handle printing and
4974/// stack trace dumping.
4975pub const unexpected_error_tracing = !builtin.zig_is_stage2 and builtin.mode == .Debug;
49724976
4973pub const UnexpectedError = error{4977pub const UnexpectedError = error{
4974 /// The Operating System returned an undocumented error code.4978 /// The Operating System returned an undocumented error code.