From ab607d455e47c35b980c3281ef5c3fb433a770a7 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Sun, 17 Jan 2021 16:18:00 +0100 Subject: SPIR-V: Initial architecture definitions and setup --- src/link.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/link.zig') diff --git a/src/link.zig b/src/link.zig index 6914131bea..fdbb7efd4b 100644 --- a/src/link.zig +++ b/src/link.zig @@ -133,6 +133,7 @@ pub const File = struct { macho: MachO.TextBlock, c: C.DeclBlock, wasm: void, + spirv: void, }; pub const LinkFn = union { @@ -141,6 +142,7 @@ pub const File = struct { macho: MachO.SrcFn, c: C.FnBlock, wasm: ?Wasm.FnData, + spirv: void, }; pub const Export = union { @@ -149,6 +151,7 @@ pub const File = struct { macho: MachO.Export, c: void, wasm: void, + spirv: void, }; /// For DWARF .debug_info. @@ -177,6 +180,7 @@ pub const File = struct { .macho => &(try MachO.createEmpty(allocator, options)).base, .wasm => &(try Wasm.createEmpty(allocator, options)).base, .c => unreachable, // Reported error earlier. + .spirv => return error.SpirVObjectFormatUnimplemented, .hex => return error.HexObjectFormatUnimplemented, .raw => return error.RawObjectFormatUnimplemented, }; @@ -192,6 +196,7 @@ pub const File = struct { .macho => &(try MachO.createEmpty(allocator, options)).base, .wasm => &(try Wasm.createEmpty(allocator, options)).base, .c => unreachable, // Reported error earlier. + .spirv => return error.SpirVObjectFormatUnimplemented, .hex => return error.HexObjectFormatUnimplemented, .raw => return error.RawObjectFormatUnimplemented, }; @@ -207,6 +212,7 @@ pub const File = struct { .macho => &(try MachO.openPath(allocator, sub_path, options)).base, .wasm => &(try Wasm.openPath(allocator, sub_path, options)).base, .c => &(try C.openPath(allocator, sub_path, options)).base, + .spirv => return error.SpirVObjectFormatUnimplemented, .hex => return error.HexObjectFormatUnimplemented, .raw => return error.RawObjectFormatUnimplemented, }; @@ -595,6 +601,7 @@ pub const File = struct { macho, c, wasm, + spirv, }; pub const ErrorFlags = struct { @@ -605,6 +612,7 @@ pub const File = struct { pub const Coff = @import("link/Coff.zig"); pub const Elf = @import("link/Elf.zig"); pub const MachO = @import("link/MachO.zig"); + pub const SpirV = @import("link/SpirV.zig"); pub const Wasm = @import("link/Wasm.zig"); }; -- cgit v1.2.3