| ... | @@ -646,17 +646,17 @@ pub const Builder = struct { | ... | @@ -646,17 +646,17 @@ pub const Builder = struct { |
| 646 | .diagnostics = &diags, | 646 | .diagnostics = &diags, |
| 647 | }) catch |err| switch (err) { | 647 | }) catch |err| switch (err) { |
| 648 | error.UnknownCpuModel => { | 648 | error.UnknownCpuModel => { |
| 649 | std.debug.warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{ | 649 | warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{ |
| 650 | diags.cpu_name.?, | 650 | diags.cpu_name.?, |
| 651 | @tagName(diags.arch.?), | 651 | @tagName(diags.arch.?), |
| 652 | }); | 652 | }); |
| 653 | for (diags.arch.?.allCpuModels()) |cpu| { | 653 | for (diags.arch.?.allCpuModels()) |cpu| { |
| 654 | std.debug.warn(" {}\n", .{cpu.name}); | 654 | warn(" {}\n", .{cpu.name}); |
| 655 | } | 655 | } |
| 656 | process.exit(1); | 656 | process.exit(1); |
| 657 | }, | 657 | }, |
| 658 | error.UnknownCpuFeature => { | 658 | error.UnknownCpuFeature => { |
| 659 | std.debug.warn( | 659 | warn( |
| 660 | \\Unknown CPU feature: '{}' | 660 | \\Unknown CPU feature: '{}' |
| 661 | \\Available CPU features for architecture '{}': | 661 | \\Available CPU features for architecture '{}': |
| 662 | \\ | 662 | \\ |
| ... | @@ -665,23 +665,23 @@ pub const Builder = struct { | ... | @@ -665,23 +665,23 @@ pub const Builder = struct { |
| 665 | @tagName(diags.arch.?), | 665 | @tagName(diags.arch.?), |
| 666 | }); | 666 | }); |
| 667 | for (diags.arch.?.allFeaturesList()) |feature| { | 667 | for (diags.arch.?.allFeaturesList()) |feature| { |
| 668 | std.debug.warn(" {}: {}\n", .{ feature.name, feature.description }); | 668 | warn(" {}: {}\n", .{ feature.name, feature.description }); |
| 669 | } | 669 | } |
| 670 | process.exit(1); | 670 | process.exit(1); |
| 671 | }, | 671 | }, |
| 672 | error.UnknownOperatingSystem => { | 672 | error.UnknownOperatingSystem => { |
| 673 | std.debug.warn( | 673 | warn( |
| 674 | \\Unknown OS: '{}' | 674 | \\Unknown OS: '{}' |
| 675 | \\Available operating systems: | 675 | \\Available operating systems: |
| 676 | \\ | 676 | \\ |
| 677 | , .{diags.os_name}); | 677 | , .{diags.os_name}); |
| 678 | inline for (std.meta.fields(std.Target.Os.Tag)) |field| { | 678 | inline for (std.meta.fields(std.Target.Os.Tag)) |field| { |
| 679 | std.debug.warn(" {}\n", .{field.name}); | 679 | warn(" {}\n", .{field.name}); |
| 680 | } | 680 | } |
| 681 | process.exit(1); | 681 | process.exit(1); |
| 682 | }, | 682 | }, |
| 683 | else => |e| { | 683 | else => |e| { |
| 684 | std.debug.warn("Unable to parse target '{}': {}\n", .{ triple, @errorName(e) }); | 684 | warn("Unable to parse target '{}': {}\n", .{ triple, @errorName(e) }); |
| 685 | process.exit(1); | 685 | process.exit(1); |
| 686 | }, | 686 | }, |
| 687 | }; | 687 | }; |
| ... | @@ -696,12 +696,12 @@ pub const Builder = struct { | ... | @@ -696,12 +696,12 @@ pub const Builder = struct { |
| 696 | break :whitelist_check; | 696 | break :whitelist_check; |
| 697 | } | 697 | } |
| 698 | } | 698 | } |
| 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", .{ |
| 700 | selected_canonicalized_triple, | 700 | selected_canonicalized_triple, |
| 701 | }); | 701 | }); |
| 702 | for (list) |t| { | 702 | for (list) |t| { |
| 703 | const t_triple = t.zigTriple(self.allocator) catch unreachable; | 703 | const t_triple = t.zigTriple(self.allocator) catch unreachable; |
| 704 | std.debug.warn(" {}\n", .{t_triple}); | 704 | warn(" {}\n", .{t_triple}); |
| 705 | } | 705 | } |
| 706 | // TODO instead of process exit, return error and have a zig build flag implemented by | 706 | // TODO instead of process exit, return error and have a zig build flag implemented by |
| 707 | // the build runner that turns process exits into error return traces | 707 | // the build runner that turns process exits into error return traces |