| ... | @@ -110,7 +110,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -110,7 +110,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 110 | .netbsd => "netbsd", | 110 | .netbsd => "netbsd", |
| 111 | .openbsd => "openbsd", | 111 | .openbsd => "openbsd", |
| 112 | .solaris, .illumos => "solaris", | 112 | .solaris, .illumos => "solaris", |
| 113 | .windows => "windows", | 113 | .windows, .uefi => "windows", |
| 114 | .zos => "zos", | 114 | .zos => "zos", |
| 115 | .haiku => "haiku", | 115 | .haiku => "haiku", |
| 116 | .rtems => "rtems", | 116 | .rtems => "rtems", |
| ... | @@ -128,7 +128,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -128,7 +128,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 128 | .hurd => "hurd", | 128 | .hurd => "hurd", |
| 129 | .wasi => "wasi", | 129 | .wasi => "wasi", |
| 130 | .emscripten => "emscripten", | 130 | .emscripten => "emscripten", |
| 131 | .uefi => "windows", | | |
| 132 | .macos => "macosx", | 131 | .macos => "macosx", |
| 133 | .ios => "ios", | 132 | .ios => "ios", |
| 134 | .tvos => "tvos", | 133 | .tvos => "tvos", |
| ... | @@ -205,14 +204,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -205,14 +204,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 205 | | 204 | |
| 206 | pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { | 205 | pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 207 | return switch (os_tag) { | 206 | return switch (os_tag) { |
| 208 | .freestanding, | 207 | .freestanding => .UnknownOS, |
| 209 | .other, | | |
| 210 | .opencl, | | |
| 211 | .opengl, | | |
| 212 | .plan9, | | |
| 213 | .contiki, | | |
| 214 | => .UnknownOS, | | |
| 215 | | | |
| 216 | .windows, .uefi => .Win32, | 208 | .windows, .uefi => .Win32, |
| 217 | .dragonfly => .DragonFly, | 209 | .dragonfly => .DragonFly, |
| 218 | .freebsd => .FreeBSD, | 210 | .freebsd => .FreeBSD, |
| ... | @@ -231,6 +223,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { | ... | @@ -231,6 +223,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 231 | .cuda => .CUDA, | 223 | .cuda => .CUDA, |
| 232 | .nvcl => .NVCL, | 224 | .nvcl => .NVCL, |
| 233 | .amdhsa => .AMDHSA, | 225 | .amdhsa => .AMDHSA, |
| | 226 | .opencl => .UnknownOS, // https://llvm.org/docs/SPIRVUsage.html#target-triples |
| 234 | .ps4 => .PS4, | 227 | .ps4 => .PS4, |
| 235 | .ps5 => .PS5, | 228 | .ps5 => .PS5, |
| 236 | .elfiamcu => .ELFIAMCU, | 229 | .elfiamcu => .ELFIAMCU, |
| ... | @@ -247,6 +240,12 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { | ... | @@ -247,6 +240,12 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 247 | .shadermodel => .ShaderModel, | 240 | .shadermodel => .ShaderModel, |
| 248 | .vulkan => .Vulkan, | 241 | .vulkan => .Vulkan, |
| 249 | .serenity => .Serenity, | 242 | .serenity => .Serenity, |
| | 243 | |
| | 244 | .opengl, |
| | 245 | .plan9, |
| | 246 | .contiki, |
| | 247 | .other, |
| | 248 | => .UnknownOS, |
| 250 | }; | 249 | }; |
| 251 | } | 250 | } |
| 252 | | 251 | |