| ... | ... | @@ -2799,6 +2799,16 @@ fn buildOutputType( |
| 2799 | 2799 | |
| 2800 | 2800 | const target = main_mod.resolved_target.result; |
| 2801 | 2801 | |
| 2802 | if (target.os.tag == .windows and major_subsystem_version == null and minor_subsystem_version == null) { |
| 2803 | major_subsystem_version, minor_subsystem_version = switch (target.os.version_range.windows.min) { |
| 2804 | .nt4 => .{ 4, 0 }, |
| 2805 | .win2k => .{ 5, 0 }, |
| 2806 | .xp => if (target.cpu.arch == .x86_64) .{ 5, 2 } else .{ 5, 1 }, |
| 2807 | .ws2003 => .{ 5, 2 }, |
| 2808 | else => .{ null, null }, |
| 2809 | }; |
| 2810 | } |
| 2811 | |
| 2802 | 2812 | if (target.ofmt != .coff) { |
| 2803 | 2813 | if (manifest_file != null) { |
| 2804 | 2814 | fatal("manifest file is not allowed unless the target object format is coff (Windows/UEFI)", .{}); |