authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-21 15:51:32+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-28 03:08:10+02:00
loga3990a950d5ec207d3b3494e39db29fdb0b3a0ea
tree613abd7645796e444c1de67123ddf7c46c2c0f34
parent1c6642552e6679a11779c4a7d3172f5ce30125ce
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.zig.WindowsSdk: Fix various target checks to check for thumb.

Also remove mentions of arm and armeb; these are not relevant for Windows.

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

lib/std/zig/WindowsSdk.zig+8-8
...@@ -580,10 +580,10 @@ pub const Installation = struct {...@@ -580,10 +580,10 @@ pub const Installation = struct {
580 defer options_key.closeKey();580 defer options_key.closeKey();
581581
582 const option_name = comptime switch (builtin.target.cpu.arch) {582 const option_name = comptime switch (builtin.target.cpu.arch) {
583 .arm, .armeb => "OptionId.DesktopCPParm",583 .thumb => "OptionId.DesktopCPParm",
584 .aarch64 => "OptionId.DesktopCPParm64",584 .aarch64 => "OptionId.DesktopCPParm64",
585 .x86_64 => "OptionId.DesktopCPPx64",
586 .x86 => "OptionId.DesktopCPPx86",585 .x86 => "OptionId.DesktopCPPx86",
586 .x86_64 => "OptionId.DesktopCPPx64",
587 else => |tag| @compileError("Windows SDK cannot be detected on architecture " ++ tag),587 else => |tag| @compileError("Windows SDK cannot be detected on architecture " ++ tag),
588 };588 };
589589
...@@ -824,10 +824,10 @@ const MsvcLibDir = struct {...@@ -824,10 +824,10 @@ const MsvcLibDir = struct {
824 try lib_dir_buf.appendSlice("VC\\Tools\\MSVC\\");824 try lib_dir_buf.appendSlice("VC\\Tools\\MSVC\\");
825 try lib_dir_buf.appendSlice(default_tools_version);825 try lib_dir_buf.appendSlice(default_tools_version);
826 const folder_with_arch = "\\Lib\\" ++ comptime switch (builtin.target.cpu.arch) {826 const folder_with_arch = "\\Lib\\" ++ comptime switch (builtin.target.cpu.arch) {
827 .thumb => "arm",
828 .aarch64 => "arm64",
827 .x86 => "x86",829 .x86 => "x86",
828 .x86_64 => "x64",830 .x86_64 => "x64",
829 .arm, .armeb => "arm",
830 .aarch64 => "arm64",
831 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),831 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),
832 };832 };
833 try lib_dir_buf.appendSlice(folder_with_arch);833 try lib_dir_buf.appendSlice(folder_with_arch);
...@@ -909,10 +909,10 @@ const MsvcLibDir = struct {...@@ -909,10 +909,10 @@ const MsvcLibDir = struct {
909 }909 }
910910
911 const folder_with_arch = "\\Lib\\" ++ comptime switch (builtin.target.cpu.arch) {911 const folder_with_arch = "\\Lib\\" ++ comptime switch (builtin.target.cpu.arch) {
912 .thumb => "arm",
913 .aarch64 => "arm64",
912 .x86 => "x86",914 .x86 => "x86",
913 .x86_64 => "x64",915 .x86_64 => "x64",
914 .arm, .armeb => "arm",
915 .aarch64 => "arm64",
916 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),916 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),
917 };917 };
918918
...@@ -977,10 +977,10 @@ const MsvcLibDir = struct {...@@ -977,10 +977,10 @@ const MsvcLibDir = struct {
977 errdefer base_path.deinit();977 errdefer base_path.deinit();
978978
979 const folder_with_arch = "\\VC\\lib\\" ++ comptime switch (builtin.target.cpu.arch) {979 const folder_with_arch = "\\VC\\lib\\" ++ comptime switch (builtin.target.cpu.arch) {
980 .thumb => "arm",
981 .aarch64 => "arm64",
980 .x86 => "", //x86 is in the root of the Lib folder982 .x86 => "", //x86 is in the root of the Lib folder
981 .x86_64 => "amd64",983 .x86_64 => "amd64",
982 .arm, .armeb => "arm",
983 .aarch64 => "arm64",
984 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),984 else => |tag| @compileError("MSVC lib dir cannot be detected on architecture " ++ tag),
985 };985 };
986 try base_path.appendSlice(folder_with_arch);986 try base_path.appendSlice(folder_with_arch);