| 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 | 482 | .spirv, |
| 483 | 483 | .spirv32, |
| 484 | 484 | .loongarch32, |
| 485 | .dxil, | |
| 486 | 485 | .xtensa, |
| 487 | 486 | => {}, // Already 32 bit |
| 488 | 487 | |
| ... | ... | @@ -509,7 +508,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target { |
| 509 | 508 | .arc, |
| 510 | 509 | .avr, |
| 511 | 510 | .csky, |
| 512 | .dxil, | |
| 513 | 511 | .hexagon, |
| 514 | 512 | .kalimba, |
| 515 | 513 | .lanai, |
| ... | ... | @@ -578,7 +576,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 578 | 576 | .bpfel => "bpfel", |
| 579 | 577 | .bpfeb => "bpfeb", |
| 580 | 578 | .csky => "csky", |
| 581 | .dxil => "dxil", | |
| 582 | 579 | .hexagon => "hexagon", |
| 583 | 580 | .loongarch32 => "loongarch32", |
| 584 | 581 | .loongarch64 => "loongarch64", |
| ... | ... | @@ -702,21 +699,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 702 | 699 | .cygnus => "cygnus", |
| 703 | 700 | .simulator => "simulator", |
| 704 | 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 | 702 | .ohos => "openhos", |
| 721 | 703 | }; |
| 722 | 704 | writer.writeAll(llvm_abi) catch unreachable; |
lib/std/Target.zig+20-28| ... | ... | @@ -673,26 +673,26 @@ pub const Abi = enum { |
| 673 | 673 | cygnus, |
| 674 | 674 | simulator, |
| 675 | 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 | 676 | ohos, |
| 692 | 677 | |
| 693 | 678 | // LLVM tags deliberately omitted: |
| 694 | // - gnuf64 | |
| 679 | // - amplification | |
| 680 | // - anyhit | |
| 681 | // - callable | |
| 682 | // - closesthit | |
| 683 | // - compute | |
| 695 | 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 | 697 | pub fn default(arch: Cpu.Arch, os: Os) Abi { |
| 698 | 698 | return if (arch.isWasm()) .musl else switch (os.tag) { |
| ... | ... | @@ -788,8 +788,6 @@ pub const ObjectFormat = enum { |
| 788 | 788 | c, |
| 789 | 789 | /// The Common Object File Format used by Windows and UEFI. |
| 790 | 790 | coff, |
| 791 | /// The DirectX Container format containing either DXIL or DXBC. | |
| 792 | dxcontainer, | |
| 793 | 791 | /// The Executable and Linkable Format used by many Unixes. |
| 794 | 792 | elf, |
| 795 | 793 | /// The Generalized Object File Format used by z/OS. |
| ... | ... | @@ -811,11 +809,13 @@ pub const ObjectFormat = enum { |
| 811 | 809 | /// The eXtended Common Object File Format used by AIX. |
| 812 | 810 | xcoff, |
| 813 | 811 | |
| 812 | // LLVM tags deliberately omitted: | |
| 813 | // - dxcontainer | |
| 814 | ||
| 814 | 815 | pub fn fileExt(of: ObjectFormat, arch: Cpu.Arch) [:0]const u8 { |
| 815 | 816 | return switch (of) { |
| 816 | 817 | .c => ".c", |
| 817 | 818 | .coff => ".obj", |
| 818 | .dxcontainer => ".dxil", | |
| 819 | 819 | .elf, .goff, .macho, .wasm, .xcoff => ".o", |
| 820 | 820 | .hex => ".ihex", |
| 821 | 821 | .nvptx => ".ptx", |
| ... | ... | @@ -833,7 +833,6 @@ pub const ObjectFormat = enum { |
| 833 | 833 | .uefi, .windows => .coff, |
| 834 | 834 | .zos => .goff, |
| 835 | 835 | else => switch (arch) { |
| 836 | .dxil => .dxcontainer, | |
| 837 | 836 | .nvptx, .nvptx64 => .nvptx, |
| 838 | 837 | .spirv, .spirv32, .spirv64 => .spirv, |
| 839 | 838 | .wasm32, .wasm64 => .wasm, |
| ... | ... | @@ -873,7 +872,6 @@ pub fn toElfMachine(target: Target) std.elf.EM { |
| 873 | 872 | .xcore => .XCORE, |
| 874 | 873 | .xtensa => .XTENSA, |
| 875 | 874 | |
| 876 | .dxil, | |
| 877 | 875 | .nvptx, |
| 878 | 876 | .nvptx64, |
| 879 | 877 | .spirv, |
| ... | ... | @@ -907,7 +905,6 @@ pub fn toCoffMachine(target: Target) std.coff.MachineType { |
| 907 | 905 | .bpfel, |
| 908 | 906 | .bpfeb, |
| 909 | 907 | .csky, |
| 910 | .dxil, | |
| 911 | 908 | .hexagon, |
| 912 | 909 | .kalimba, |
| 913 | 910 | .lanai, |
| ... | ... | @@ -1133,7 +1130,6 @@ pub const Cpu = struct { |
| 1133 | 1130 | bpfel, |
| 1134 | 1131 | bpfeb, |
| 1135 | 1132 | csky, |
| 1136 | dxil, | |
| 1137 | 1133 | hexagon, |
| 1138 | 1134 | kalimba, |
| 1139 | 1135 | lanai, |
| ... | ... | @@ -1172,6 +1168,7 @@ pub const Cpu = struct { |
| 1172 | 1168 | // - aarch64_32 |
| 1173 | 1169 | // - amdil |
| 1174 | 1170 | // - amdil64 |
| 1171 | // - dxil | |
| 1175 | 1172 | // - le32 |
| 1176 | 1173 | // - le64 |
| 1177 | 1174 | // - r600 |
| ... | ... | @@ -1344,7 +1341,6 @@ pub const Cpu = struct { |
| 1344 | 1341 | .spirv, |
| 1345 | 1342 | .spirv32, |
| 1346 | 1343 | .spirv64, |
| 1347 | .dxil, | |
| 1348 | 1344 | .loongarch32, |
| 1349 | 1345 | .loongarch64, |
| 1350 | 1346 | .arc, |
| ... | ... | @@ -1817,7 +1813,6 @@ pub const DynamicLinker = struct { |
| 1817 | 1813 | .kalimba, |
| 1818 | 1814 | .lanai, |
| 1819 | 1815 | .ve, |
| 1820 | .dxil, | |
| 1821 | 1816 | .loongarch32, |
| 1822 | 1817 | .xtensa, |
| 1823 | 1818 | => none, |
| ... | ... | @@ -1913,7 +1908,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { |
| 1913 | 1908 | .sparc, |
| 1914 | 1909 | .spirv32, |
| 1915 | 1910 | .loongarch32, |
| 1916 | .dxil, | |
| 1917 | 1911 | .xtensa, |
| 1918 | 1912 | => 32, |
| 1919 | 1913 | |
| ... | ... | @@ -2415,7 +2409,6 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 { |
| 2415 | 2409 | .csky, |
| 2416 | 2410 | .x86, |
| 2417 | 2411 | .xcore, |
| 2418 | .dxil, | |
| 2419 | 2412 | .loongarch32, |
| 2420 | 2413 | .kalimba, |
| 2421 | 2414 | .spu_2, |
| ... | ... | @@ -2519,7 +2512,6 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { |
| 2519 | 2512 | |
| 2520 | 2513 | .csky, |
| 2521 | 2514 | .xcore, |
| 2522 | .dxil, | |
| 2523 | 2515 | .loongarch32, |
| 2524 | 2516 | .kalimba, |
| 2525 | 2517 | .spu_2, |
lib/std/zig.zig-1| ... | ... | @@ -233,7 +233,6 @@ pub fn binNameAlloc(allocator: Allocator, options: BinNameOptions) error{OutOfMe |
| 233 | 233 | }), |
| 234 | 234 | }, |
| 235 | 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 | 254 | .simulator, |
| 255 | 255 | .macabi, |
| 256 | 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 | 440 | .windows, .uefi => .code_view, |
| 441 | 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 | 1703 | .spirv32, |
| 1704 | 1704 | .ve, |
| 1705 | 1705 | .spirv64, |
| 1706 | .dxil, | |
| 1707 | 1706 | .loongarch32, |
| 1708 | 1707 | .loongarch64, |
| 1709 | 1708 | .xtensa, |
src/Zcu.zig-1| ... | ... | @@ -3010,7 +3010,6 @@ pub fn atomicPtrAlignment( |
| 3010 | 3010 | .wasm32, |
| 3011 | 3011 | .csky, |
| 3012 | 3012 | .spirv32, |
| 3013 | .dxil, | |
| 3014 | 3013 | .loongarch32, |
| 3015 | 3014 | .xtensa, |
| 3016 | 3015 | => 32, |
src/codegen/llvm.zig-18| ... | ... | @@ -51,7 +51,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 51 | 51 | .bpfel => "bpfel", |
| 52 | 52 | .bpfeb => "bpfeb", |
| 53 | 53 | .csky => "csky", |
| 54 | .dxil => "dxil", | |
| 55 | 54 | .hexagon => "hexagon", |
| 56 | 55 | .loongarch32 => "loongarch32", |
| 57 | 56 | .loongarch64 => "loongarch64", |
| ... | ... | @@ -182,21 +181,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 182 | 181 | .cygnus => "cygnus", |
| 183 | 182 | .simulator => "simulator", |
| 184 | 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 | 184 | .ohos => "ohos", |
| 201 | 185 | }; |
| 202 | 186 | try llvm_triple.appendSlice(llvm_abi); |
| ... | ... | @@ -263,7 +247,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 263 | 247 | .bpfel => .bpfel, |
| 264 | 248 | .bpfeb => .bpfeb, |
| 265 | 249 | .csky => .csky, |
| 266 | .dxil => .dxil, | |
| 267 | 250 | .hexagon => .hexagon, |
| 268 | 251 | .loongarch32 => .loongarch32, |
| 269 | 252 | .loongarch64 => .loongarch64, |
| ... | ... | @@ -12726,7 +12709,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { |
| 12726 | 12709 | .spirv, |
| 12727 | 12710 | .spirv32, |
| 12728 | 12711 | .spirv64, |
| 12729 | .dxil, | |
| 12730 | 12712 | => {}, |
| 12731 | 12713 | |
| 12732 | 12714 | // LLVM does does not have a backend for these. |
src/link.zig-1| ... | ... | @@ -932,7 +932,6 @@ pub const File = struct { |
| 932 | 932 | .xcoff => @panic("TODO implement xcoff object format"), |
| 933 | 933 | .hex => @panic("TODO implement hex object format"), |
| 934 | 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 | 104 | => return false, |
| 105 | 105 | |
| 106 | 106 | .coff, |
| 107 | .dxcontainer, | |
| 108 | 107 | .elf, |
| 109 | 108 | .goff, |
| 110 | 109 | .hex, |
| ... | ... | @@ -161,7 +160,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { |
| 161 | 160 | => true, |
| 162 | 161 | |
| 163 | 162 | // An LLVM backend exists but we don't currently support using it. |
| 164 | .dxil, | |
| 165 | 163 | .spirv, |
| 166 | 164 | .spirv32, |
| 167 | 165 | .spirv64, |