mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
parent
0c43b6ef5c
commit
209a3da4f7
@ -127,6 +127,10 @@ fn log(
|
||||
if (@enumToInt(message_level) <= @enumToInt(level)) {
|
||||
if (@hasDecl(root, "log")) {
|
||||
root.log(message_level, scope, format, args);
|
||||
} else if (std.Target.current.os.tag == .freestanding) {
|
||||
// On freestanding one must provide a log function; we do not have
|
||||
// any I/O configured.
|
||||
return;
|
||||
} else if (builtin.mode != .ReleaseSmall) {
|
||||
const held = std.debug.getStderrMutex().acquire();
|
||||
defer held.release();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user