diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-07 14:01:54 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-07 14:01:54 -0700 |
| commit | 8e07b0c4b97817b89b0cd59c8e558348cfb5005b (patch) | |
| tree | 606d08f1970cc81dda71604e7756295a40d72fd5 /lib/std | |
| parent | e0b92004926103b88efda5c6d57f36f39a42a1f8 (diff) | |
| parent | 0c78ece1c95164f4a321f5705b20896415336d02 (diff) | |
| download | zig-8e07b0c4b97817b89b0cd59c8e558348cfb5005b.tar.gz zig-8e07b0c4b97817b89b0cd59c8e558348cfb5005b.zip | |
Merge remote-tracking branch 'origin/master' into llvm14
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/log.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/log.zig b/lib/std/log.zig index 5d9e5242a8..4110fe6d8d 100644 --- a/lib/std/log.zig +++ b/lib/std/log.zig @@ -156,11 +156,11 @@ pub fn defaultLog( comptime format: []const u8, args: anytype, ) void { - if (builtin.os.tag == .freestanding) { - // On freestanding one must provide a log function; we do not have - // any I/O configured. - return; - } + if (builtin.os.tag == .freestanding) + @compileError( + \\freestanding targets do not have I/O configured; + \\please provide at least an empty `log` function declaration + ); const level_txt = comptime message_level.asText(); const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): "; |
