authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 04:00:25+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 04:01:21+11:00
logad1780959dbe422681354e883bc0beb032742cc1
tree306aab4075be793a5a5fbf59395c35b2bb61069c
parent93bb1d93cd18e739410009e7c77048d151a93b10
signaturelock-open Commit is signed but in an unrecognized format.

std/build.zig: use (existing) warn function alias


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

lib/std/build.zig+9-9
......@@ -646,17 +646,17 @@ pub const Builder = struct {
646646 .diagnostics = &diags,
647647 }) catch |err| switch (err) {
648648 error.UnknownCpuModel => {
649 std.debug.warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{
649 warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{
650650 diags.cpu_name.?,
651651 @tagName(diags.arch.?),
652652 });
653653 for (diags.arch.?.allCpuModels()) |cpu| {
654 std.debug.warn(" {}\n", .{cpu.name});
654 warn(" {}\n", .{cpu.name});
655655 }
656656 process.exit(1);
657657 },
658658 error.UnknownCpuFeature => {
659 std.debug.warn(
659 warn(
660660 \\Unknown CPU feature: '{}'
661661 \\Available CPU features for architecture '{}':
662662 \\
......@@ -665,23 +665,23 @@ pub const Builder = struct {
665665 @tagName(diags.arch.?),
666666 });
667667 for (diags.arch.?.allFeaturesList()) |feature| {
668 std.debug.warn(" {}: {}\n", .{ feature.name, feature.description });
668 warn(" {}: {}\n", .{ feature.name, feature.description });
669669 }
670670 process.exit(1);
671671 },
672672 error.UnknownOperatingSystem => {
673 std.debug.warn(
673 warn(
674674 \\Unknown OS: '{}'
675675 \\Available operating systems:
676676 \\
677677 , .{diags.os_name});
678678 inline for (std.meta.fields(std.Target.Os.Tag)) |field| {
679 std.debug.warn(" {}\n", .{field.name});
679 warn(" {}\n", .{field.name});
680680 }
681681 process.exit(1);
682682 },
683683 else => |e| {
684 std.debug.warn("Unable to parse target '{}': {}\n", .{ triple, @errorName(e) });
684 warn("Unable to parse target '{}': {}\n", .{ triple, @errorName(e) });
685685 process.exit(1);
686686 },
687687 };
......@@ -696,12 +696,12 @@ pub const Builder = struct {
696696 break :whitelist_check;
697697 }
698698 }
699 std.debug.warn("Chosen target '{}' does not match one of the supported targets:\n", .{
699 warn("Chosen target '{}' does not match one of the supported targets:\n", .{
700700 selected_canonicalized_triple,
701701 });
702702 for (list) |t| {
703703 const t_triple = t.zigTriple(self.allocator) catch unreachable;
704 std.debug.warn(" {}\n", .{t_triple});
704 warn(" {}\n", .{t_triple});
705705 }
706706 // TODO instead of process exit, return error and have a zig build flag implemented by
707707 // the build runner that turns process exits into error return traces