| ... | ... | @@ -646,17 +646,17 @@ pub const Builder = struct { |
| 646 | 646 | .diagnostics = &diags, |
| 647 | 647 | }) catch |err| switch (err) { |
| 648 | 648 | error.UnknownCpuModel => { |
| 649 | | std.debug.warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{ |
| 649 | warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{ |
| 650 | 650 | diags.cpu_name.?, |
| 651 | 651 | @tagName(diags.arch.?), |
| 652 | 652 | }); |
| 653 | 653 | for (diags.arch.?.allCpuModels()) |cpu| { |
| 654 | | std.debug.warn(" {}\n", .{cpu.name}); |
| 654 | warn(" {}\n", .{cpu.name}); |
| 655 | 655 | } |
| 656 | 656 | process.exit(1); |
| 657 | 657 | }, |
| 658 | 658 | error.UnknownCpuFeature => { |
| 659 | | std.debug.warn( |
| 659 | warn( |
| 660 | 660 | \\Unknown CPU feature: '{}' |
| 661 | 661 | \\Available CPU features for architecture '{}': |
| 662 | 662 | \\ |
| ... | ... | @@ -665,23 +665,23 @@ pub const Builder = struct { |
| 665 | 665 | @tagName(diags.arch.?), |
| 666 | 666 | }); |
| 667 | 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 | 670 | process.exit(1); |
| 671 | 671 | }, |
| 672 | 672 | error.UnknownOperatingSystem => { |
| 673 | | std.debug.warn( |
| 673 | warn( |
| 674 | 674 | \\Unknown OS: '{}' |
| 675 | 675 | \\Available operating systems: |
| 676 | 676 | \\ |
| 677 | 677 | , .{diags.os_name}); |
| 678 | 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 | 681 | process.exit(1); |
| 682 | 682 | }, |
| 683 | 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 | 685 | process.exit(1); |
| 686 | 686 | }, |
| 687 | 687 | }; |
| ... | ... | @@ -696,12 +696,12 @@ pub const Builder = struct { |
| 696 | 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 | 700 | selected_canonicalized_triple, |
| 701 | 701 | }); |
| 702 | 702 | for (list) |t| { |
| 703 | 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 | 706 | // TODO instead of process exit, return error and have a zig build flag implemented by |
| 707 | 707 | // the build runner that turns process exits into error return traces |