| author | |
| committer | |
| log | d1901c744c9bf2862f99be837325e0a50365c38b |
| tree | fed4532aba4e3c8f21ec3a96a5fa8b58dc89c534 |
| parent | b2c53eb0d717989caf66dc8dfc0a7b1afb2607b3 |
See: https://devblogs.microsoft.com/directx/directx-adopting-spir-v
Since we never hooked up the (experimental) DirectX LLVM backend, we've never
actually supported targeting DXIL in Zig. With Microsoft moving away from DXIL,
that seems very unlikely to change.10 files changed, 21 insertions(+), 88 deletions(-)
lib/compiler/aro/aro/target.zig-18| ... | @@ -482,7 +482,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target { | ... | @@ -482,7 +482,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target { |
| 482 | .spirv, | 482 | .spirv, |
| 483 | .spirv32, | 483 | .spirv32, |
| 484 | .loongarch32, | 484 | .loongarch32, |
| 485 | .dxil, | ||
| 486 | .xtensa, | 485 | .xtensa, |
| 487 | => {}, // Already 32 bit | 486 | => {}, // Already 32 bit |
| 488 | 487 | ||
| ... | @@ -509,7 +508,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target { | ... | @@ -509,7 +508,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target { |
| 509 | .arc, | 508 | .arc, |
| 510 | .avr, | 509 | .avr, |
| 511 | .csky, | 510 | .csky, |
| 512 | .dxil, | ||
| 513 | .hexagon, | 511 | .hexagon, |
| 514 | .kalimba, | 512 | .kalimba, |
| 515 | .lanai, | 513 | .lanai, |
| ... | @@ -578,7 +576,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { | ... | @@ -578,7 +576,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 578 | .bpfel => "bpfel", | 576 | .bpfel => "bpfel", |
| 579 | .bpfeb => "bpfeb", | 577 | .bpfeb => "bpfeb", |
| 580 | .csky => "csky", | 578 | .csky => "csky", |
| 581 | .dxil => "dxil", | ||
| 582 | .hexagon => "hexagon", | 579 | .hexagon => "hexagon", |
| 583 | .loongarch32 => "loongarch32", | 580 | .loongarch32 => "loongarch32", |
| 584 | .loongarch64 => "loongarch64", | 581 | .loongarch64 => "loongarch64", |
| ... | @@ -702,21 +699,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { | ... | @@ -702,21 +699,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 702 | .cygnus => "cygnus", | 699 | .cygnus => "cygnus", |
| 703 | .simulator => "simulator", | 700 | .simulator => "simulator", |
| 704 | .macabi => "macabi", | 701 | .macabi => "macabi", |
| 705 | .pixel => "pixel", | ||
| 706 | .vertex => "vertex", | ||
| 707 | .geometry => "geometry", | ||
| 708 | .hull => "hull", | ||
| 709 | .domain => "domain", | ||
| 710 | .compute => "compute", | ||
| 711 | .library => "library", | ||
| 712 | .raygeneration => "raygeneration", | ||
| 713 | .intersection => "intersection", | ||
| 714 | .anyhit => "anyhit", | ||
| 715 | .closesthit => "closesthit", | ||
| 716 | .miss => "miss", | ||
| 717 | .callable => "callable", | ||
| 718 | .mesh => "mesh", | ||
| 719 | .amplification => "amplification", | ||
| 720 | .ohos => "openhos", | 702 | .ohos => "openhos", |
| 721 | }; | 703 | }; |
| 722 | writer.writeAll(llvm_abi) catch unreachable; | 704 | writer.writeAll(llvm_abi) catch unreachable; |
lib/std/Target.zig+20-28| ... | @@ -673,26 +673,26 @@ pub const Abi = enum { | ... | @@ -673,26 +673,26 @@ pub const Abi = enum { |
| 673 | cygnus, | 673 | cygnus, |
| 674 | simulator, | 674 | simulator, |
| 675 | macabi, | 675 | macabi, |
| 676 | pixel, | ||
| 677 | vertex, | ||
| 678 | geometry, | ||
| 679 | hull, | ||
| 680 | domain, | ||
| 681 | compute, | ||
| 682 | library, | ||
| 683 | raygeneration, | ||
| 684 | intersection, | ||
| 685 | anyhit, | ||
| 686 | closesthit, | ||
| 687 | miss, | ||
| 688 | callable, | ||
| 689 | mesh, | ||
| 690 | amplification, | ||
| 691 | ohos, | 676 | ohos, |
| 692 | 677 | ||
| 693 | // LLVM tags deliberately omitted: | 678 | // LLVM tags deliberately omitted: |
| 694 | // - gnuf64 | 679 | // - amplification |
| 680 | // - anyhit | ||
| 681 | // - callable | ||
| 682 | // - closesthit | ||
| 683 | // - compute | ||
| 695 | // - coreclr | 684 | // - coreclr |
| 685 | // - domain | ||
| 686 | // - geometry | ||
| 687 | // - gnuf64 | ||
| 688 | // - hull | ||
| 689 | // - intersection | ||
| 690 | // - library | ||
| 691 | // - mesh | ||
| 692 | // - miss | ||
| 693 | // - pixel | ||
| 694 | // - raygeneration | ||
| 695 | // - vertex | ||
| 696 | 696 | ||
| 697 | pub fn default(arch: Cpu.Arch, os: Os) Abi { | 697 | pub fn default(arch: Cpu.Arch, os: Os) Abi { |
| 698 | return if (arch.isWasm()) .musl else switch (os.tag) { | 698 | return if (arch.isWasm()) .musl else switch (os.tag) { |
| ... | @@ -788,8 +788,6 @@ pub const ObjectFormat = enum { | ... | @@ -788,8 +788,6 @@ pub const ObjectFormat = enum { |
| 788 | c, | 788 | c, |
| 789 | /// The Common Object File Format used by Windows and UEFI. | 789 | /// The Common Object File Format used by Windows and UEFI. |
| 790 | coff, | 790 | coff, |
| 791 | /// The DirectX Container format containing either DXIL or DXBC. | ||
| 792 | dxcontainer, | ||
| 793 | /// The Executable and Linkable Format used by many Unixes. | 791 | /// The Executable and Linkable Format used by many Unixes. |
| 794 | elf, | 792 | elf, |
| 795 | /// The Generalized Object File Format used by z/OS. | 793 | /// The Generalized Object File Format used by z/OS. |
| ... | @@ -811,11 +809,13 @@ pub const ObjectFormat = enum { | ... | @@ -811,11 +809,13 @@ pub const ObjectFormat = enum { |
| 811 | /// The eXtended Common Object File Format used by AIX. | 809 | /// The eXtended Common Object File Format used by AIX. |
| 812 | xcoff, | 810 | xcoff, |
| 813 | 811 | ||
| 812 | // LLVM tags deliberately omitted: | ||
| 813 | // - dxcontainer | ||
| 814 | |||
| 814 | pub fn fileExt(of: ObjectFormat, arch: Cpu.Arch) [:0]const u8 { | 815 | pub fn fileExt(of: ObjectFormat, arch: Cpu.Arch) [:0]const u8 { |
| 815 | return switch (of) { | 816 | return switch (of) { |
| 816 | .c => ".c", | 817 | .c => ".c", |
| 817 | .coff => ".obj", | 818 | .coff => ".obj", |
| 818 | .dxcontainer => ".dxil", | ||
| 819 | .elf, .goff, .macho, .wasm, .xcoff => ".o", | 819 | .elf, .goff, .macho, .wasm, .xcoff => ".o", |
| 820 | .hex => ".ihex", | 820 | .hex => ".ihex", |
| 821 | .nvptx => ".ptx", | 821 | .nvptx => ".ptx", |
| ... | @@ -833,7 +833,6 @@ pub const ObjectFormat = enum { | ... | @@ -833,7 +833,6 @@ pub const ObjectFormat = enum { |
| 833 | .uefi, .windows => .coff, | 833 | .uefi, .windows => .coff, |
| 834 | .zos => .goff, | 834 | .zos => .goff, |
| 835 | else => switch (arch) { | 835 | else => switch (arch) { |
| 836 | .dxil => .dxcontainer, | ||
| 837 | .nvptx, .nvptx64 => .nvptx, | 836 | .nvptx, .nvptx64 => .nvptx, |
| 838 | .spirv, .spirv32, .spirv64 => .spirv, | 837 | .spirv, .spirv32, .spirv64 => .spirv, |
| 839 | .wasm32, .wasm64 => .wasm, | 838 | .wasm32, .wasm64 => .wasm, |
| ... | @@ -873,7 +872,6 @@ pub fn toElfMachine(target: Target) std.elf.EM { | ... | @@ -873,7 +872,6 @@ pub fn toElfMachine(target: Target) std.elf.EM { |
| 873 | .xcore => .XCORE, | 872 | .xcore => .XCORE, |
| 874 | .xtensa => .XTENSA, | 873 | .xtensa => .XTENSA, |
| 875 | 874 | ||
| 876 | .dxil, | ||
| 877 | .nvptx, | 875 | .nvptx, |
| 878 | .nvptx64, | 876 | .nvptx64, |
| 879 | .spirv, | 877 | .spirv, |
| ... | @@ -907,7 +905,6 @@ pub fn toCoffMachine(target: Target) std.coff.MachineType { | ... | @@ -907,7 +905,6 @@ pub fn toCoffMachine(target: Target) std.coff.MachineType { |
| 907 | .bpfel, | 905 | .bpfel, |
| 908 | .bpfeb, | 906 | .bpfeb, |
| 909 | .csky, | 907 | .csky, |
| 910 | .dxil, | ||
| 911 | .hexagon, | 908 | .hexagon, |
| 912 | .kalimba, | 909 | .kalimba, |
| 913 | .lanai, | 910 | .lanai, |
| ... | @@ -1133,7 +1130,6 @@ pub const Cpu = struct { | ... | @@ -1133,7 +1130,6 @@ pub const Cpu = struct { |
| 1133 | bpfel, | 1130 | bpfel, |
| 1134 | bpfeb, | 1131 | bpfeb, |
| 1135 | csky, | 1132 | csky, |
| 1136 | dxil, | ||
| 1137 | hexagon, | 1133 | hexagon, |
| 1138 | kalimba, | 1134 | kalimba, |
| 1139 | lanai, | 1135 | lanai, |
| ... | @@ -1172,6 +1168,7 @@ pub const Cpu = struct { | ... | @@ -1172,6 +1168,7 @@ pub const Cpu = struct { |
| 1172 | // - aarch64_32 | 1168 | // - aarch64_32 |
| 1173 | // - amdil | 1169 | // - amdil |
| 1174 | // - amdil64 | 1170 | // - amdil64 |
| 1171 | // - dxil | ||
| 1175 | // - le32 | 1172 | // - le32 |
| 1176 | // - le64 | 1173 | // - le64 |
| 1177 | // - r600 | 1174 | // - r600 |
| ... | @@ -1344,7 +1341,6 @@ pub const Cpu = struct { | ... | @@ -1344,7 +1341,6 @@ pub const Cpu = struct { |
| 1344 | .spirv, | 1341 | .spirv, |
| 1345 | .spirv32, | 1342 | .spirv32, |
| 1346 | .spirv64, | 1343 | .spirv64, |
| 1347 | .dxil, | ||
| 1348 | .loongarch32, | 1344 | .loongarch32, |
| 1349 | .loongarch64, | 1345 | .loongarch64, |
| 1350 | .arc, | 1346 | .arc, |
| ... | @@ -1817,7 +1813,6 @@ pub const DynamicLinker = struct { | ... | @@ -1817,7 +1813,6 @@ pub const DynamicLinker = struct { |
| 1817 | .kalimba, | 1813 | .kalimba, |
| 1818 | .lanai, | 1814 | .lanai, |
| 1819 | .ve, | 1815 | .ve, |
| 1820 | .dxil, | ||
| 1821 | .loongarch32, | 1816 | .loongarch32, |
| 1822 | .xtensa, | 1817 | .xtensa, |
| 1823 | => none, | 1818 | => none, |
| ... | @@ -1913,7 +1908,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { | ... | @@ -1913,7 +1908,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { |
| 1913 | .sparc, | 1908 | .sparc, |
| 1914 | .spirv32, | 1909 | .spirv32, |
| 1915 | .loongarch32, | 1910 | .loongarch32, |
| 1916 | .dxil, | ||
| 1917 | .xtensa, | 1911 | .xtensa, |
| 1918 | => 32, | 1912 | => 32, |
| 1919 | 1913 | ||
| ... | @@ -2415,7 +2409,6 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 { | ... | @@ -2415,7 +2409,6 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 { |
| 2415 | .csky, | 2409 | .csky, |
| 2416 | .x86, | 2410 | .x86, |
| 2417 | .xcore, | 2411 | .xcore, |
| 2418 | .dxil, | ||
| 2419 | .loongarch32, | 2412 | .loongarch32, |
| 2420 | .kalimba, | 2413 | .kalimba, |
| 2421 | .spu_2, | 2414 | .spu_2, |
| ... | @@ -2519,7 +2512,6 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { | ... | @@ -2519,7 +2512,6 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { |
| 2519 | 2512 | ||
| 2520 | .csky, | 2513 | .csky, |
| 2521 | .xcore, | 2514 | .xcore, |
| 2522 | .dxil, | ||
| 2523 | .loongarch32, | 2515 | .loongarch32, |
| 2524 | .kalimba, | 2516 | .kalimba, |
| 2525 | .spu_2, | 2517 | .spu_2, |
lib/std/zig.zig-1| ... | @@ -233,7 +233,6 @@ pub fn binNameAlloc(allocator: Allocator, options: BinNameOptions) error{OutOfMe | ... | @@ -233,7 +233,6 @@ pub fn binNameAlloc(allocator: Allocator, options: BinNameOptions) error{OutOfMe |
| 233 | }), | 233 | }), |
| 234 | }, | 234 | }, |
| 235 | .nvptx => return std.fmt.allocPrint(allocator, "{s}.ptx", .{root_name}), | 235 | .nvptx => return std.fmt.allocPrint(allocator, "{s}.ptx", .{root_name}), |
| 236 | .dxcontainer => return std.fmt.allocPrint(allocator, "{s}.dxil", .{root_name}), | ||
| 237 | } | 236 | } |
| 238 | } | 237 | } |
| 239 | 238 |
lib/std/zig/LibCDirs.zig-17| ... | @@ -254,23 +254,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 { | ... | @@ -254,23 +254,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 { |
| 254 | .simulator, | 254 | .simulator, |
| 255 | .macabi, | 255 | .macabi, |
| 256 | => unreachable, | 256 | => unreachable, |
| 257 | |||
| 258 | .pixel, | ||
| 259 | .vertex, | ||
| 260 | .geometry, | ||
| 261 | .hull, | ||
| 262 | .domain, | ||
| 263 | .compute, | ||
| 264 | .library, | ||
| 265 | .raygeneration, | ||
| 266 | .intersection, | ||
| 267 | .anyhit, | ||
| 268 | .closesthit, | ||
| 269 | .miss, | ||
| 270 | .callable, | ||
| 271 | .mesh, | ||
| 272 | .amplification, | ||
| 273 | => unreachable, | ||
| 274 | } | 257 | } |
| 275 | } | 258 | } |
| 276 | 259 |
src/Compilation/Config.zig+1-1| ... | @@ -440,7 +440,7 @@ pub fn resolve(options: Options) ResolveError!Config { | ... | @@ -440,7 +440,7 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 440 | .windows, .uefi => .code_view, | 440 | .windows, .uefi => .code_view, |
| 441 | else => .{ .dwarf = .@"32" }, | 441 | else => .{ .dwarf = .@"32" }, |
| 442 | }, | 442 | }, |
| 443 | .spirv, .nvptx, .dxcontainer, .hex, .raw, .plan9 => .strip, | 443 | .spirv, .nvptx, .hex, .raw, .plan9 => .strip, |
| 444 | }; | 444 | }; |
| 445 | }; | 445 | }; |
| 446 | 446 |
src/Type.zig-1| ... | @@ -1703,7 +1703,6 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 { | ... | @@ -1703,7 +1703,6 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 { |
| 1703 | .spirv32, | 1703 | .spirv32, |
| 1704 | .ve, | 1704 | .ve, |
| 1705 | .spirv64, | 1705 | .spirv64, |
| 1706 | .dxil, | ||
| 1707 | .loongarch32, | 1706 | .loongarch32, |
| 1708 | .loongarch64, | 1707 | .loongarch64, |
| 1709 | .xtensa, | 1708 | .xtensa, |
src/Zcu.zig-1| ... | @@ -3010,7 +3010,6 @@ pub fn atomicPtrAlignment( | ... | @@ -3010,7 +3010,6 @@ pub fn atomicPtrAlignment( |
| 3010 | .wasm32, | 3010 | .wasm32, |
| 3011 | .csky, | 3011 | .csky, |
| 3012 | .spirv32, | 3012 | .spirv32, |
| 3013 | .dxil, | ||
| 3014 | .loongarch32, | 3013 | .loongarch32, |
| 3015 | .xtensa, | 3014 | .xtensa, |
| 3016 | => 32, | 3015 | => 32, |
src/codegen/llvm.zig-18| ... | @@ -51,7 +51,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -51,7 +51,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 51 | .bpfel => "bpfel", | 51 | .bpfel => "bpfel", |
| 52 | .bpfeb => "bpfeb", | 52 | .bpfeb => "bpfeb", |
| 53 | .csky => "csky", | 53 | .csky => "csky", |
| 54 | .dxil => "dxil", | ||
| 55 | .hexagon => "hexagon", | 54 | .hexagon => "hexagon", |
| 56 | .loongarch32 => "loongarch32", | 55 | .loongarch32 => "loongarch32", |
| 57 | .loongarch64 => "loongarch64", | 56 | .loongarch64 => "loongarch64", |
| ... | @@ -182,21 +181,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -182,21 +181,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 182 | .cygnus => "cygnus", | 181 | .cygnus => "cygnus", |
| 183 | .simulator => "simulator", | 182 | .simulator => "simulator", |
| 184 | .macabi => "macabi", | 183 | .macabi => "macabi", |
| 185 | .pixel => "pixel", | ||
| 186 | .vertex => "vertex", | ||
| 187 | .geometry => "geometry", | ||
| 188 | .hull => "hull", | ||
| 189 | .domain => "domain", | ||
| 190 | .compute => "compute", | ||
| 191 | .library => "library", | ||
| 192 | .raygeneration => "raygeneration", | ||
| 193 | .intersection => "intersection", | ||
| 194 | .anyhit => "anyhit", | ||
| 195 | .closesthit => "closesthit", | ||
| 196 | .miss => "miss", | ||
| 197 | .callable => "callable", | ||
| 198 | .mesh => "mesh", | ||
| 199 | .amplification => "amplification", | ||
| 200 | .ohos => "ohos", | 184 | .ohos => "ohos", |
| 201 | }; | 185 | }; |
| 202 | try llvm_triple.appendSlice(llvm_abi); | 186 | try llvm_triple.appendSlice(llvm_abi); |
| ... | @@ -263,7 +247,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { | ... | @@ -263,7 +247,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 263 | .bpfel => .bpfel, | 247 | .bpfel => .bpfel, |
| 264 | .bpfeb => .bpfeb, | 248 | .bpfeb => .bpfeb, |
| 265 | .csky => .csky, | 249 | .csky => .csky, |
| 266 | .dxil => .dxil, | ||
| 267 | .hexagon => .hexagon, | 250 | .hexagon => .hexagon, |
| 268 | .loongarch32 => .loongarch32, | 251 | .loongarch32 => .loongarch32, |
| 269 | .loongarch64 => .loongarch64, | 252 | .loongarch64 => .loongarch64, |
| ... | @@ -12726,7 +12709,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { | ... | @@ -12726,7 +12709,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { |
| 12726 | .spirv, | 12709 | .spirv, |
| 12727 | .spirv32, | 12710 | .spirv32, |
| 12728 | .spirv64, | 12711 | .spirv64, |
| 12729 | .dxil, | ||
| 12730 | => {}, | 12712 | => {}, |
| 12731 | 12713 | ||
| 12732 | // LLVM does does not have a backend for these. | 12714 | // LLVM does does not have a backend for these. |
src/link.zig-1| ... | @@ -932,7 +932,6 @@ pub const File = struct { | ... | @@ -932,7 +932,6 @@ pub const File = struct { |
| 932 | .xcoff => @panic("TODO implement xcoff object format"), | 932 | .xcoff => @panic("TODO implement xcoff object format"), |
| 933 | .hex => @panic("TODO implement hex object format"), | 933 | .hex => @panic("TODO implement hex object format"), |
| 934 | .raw => @panic("TODO implement raw object format"), | 934 | .raw => @panic("TODO implement raw object format"), |
| 935 | .dxcontainer => @panic("TODO implement dxcontainer object format"), | ||
| 936 | }; | 935 | }; |
| 937 | } | 936 | } |
| 938 | 937 |
src/target.zig-2| ... | @@ -104,7 +104,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { | ... | @@ -104,7 +104,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { |
| 104 | => return false, | 104 | => return false, |
| 105 | 105 | ||
| 106 | .coff, | 106 | .coff, |
| 107 | .dxcontainer, | ||
| 108 | .elf, | 107 | .elf, |
| 109 | .goff, | 108 | .goff, |
| 110 | .hex, | 109 | .hex, |
| ... | @@ -161,7 +160,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { | ... | @@ -161,7 +160,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { |
| 161 | => true, | 160 | => true, |
| 162 | 161 | ||
| 163 | // An LLVM backend exists but we don't currently support using it. | 162 | // An LLVM backend exists but we don't currently support using it. |
| 164 | .dxil, | ||
| 165 | .spirv, | 163 | .spirv, |
| 166 | .spirv32, | 164 | .spirv32, |
| 167 | .spirv64, | 165 | .spirv64, |