authorgravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2022-10-24 17:01:26-04:00
committergravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2022-10-24 17:01:26-04:00
log5aef54cbc83cce5c1afe9aededfc505d89559741
treeaa3a60637123d531b5c7834e25019aa46aac82d5
parentc6fb798740119b78def920c649c03a644fa2380b

additional fixes for Plan9

with this, the tests should pass

4 files changed, 12 insertions(+), 5 deletions(-)

src/Compilation.zig+3-3
......@@ -1088,10 +1088,10 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
10881088 // Once they are capable this condition could be removed. When removing this condition,
10891089 // also test the use case of `build-obj -fcompiler-rt` with the native backends
10901090 // and make sure the compiler-rt symbols are emitted.
1091 const capable_of_building_compiler_rt = build_options.have_llvm;
1091 const capable_of_building_compiler_rt = build_options.have_llvm and options.target.os.tag != .plan9;
10921092
1093 const capable_of_building_zig_libc = build_options.have_llvm;
1094 const capable_of_building_ssp = build_options.have_llvm;
1093 const capable_of_building_zig_libc = build_options.have_llvm and options.target.os.tag != .plan9;
1094 const capable_of_building_ssp = build_options.have_llvm and options.target.os.tag != .plan9;
10951095
10961096 const comp: *Compilation = comp: {
10971097 // For allocations that have the same lifetime as Compilation. This arena is used only during this
src/link.zig+1-1
......@@ -581,7 +581,7 @@ pub const File = struct {
581581 .macho => return @fieldParentPtr(MachO, "base", base).updateDeclLineNumber(module, decl),
582582 .c => return @fieldParentPtr(C, "base", base).updateDeclLineNumber(module, decl),
583583 .wasm => return @fieldParentPtr(Wasm, "base", base).updateDeclLineNumber(module, decl),
584 .plan9 => @panic("TODO: implement updateDeclLineNumber for plan9"),
584 .plan9 => return @fieldParentPtr(Plan9, "base", base).updateDeclLineNumber(module, decl),
585585 .spirv, .nvptx => {},
586586 }
587587 }
src/link/Plan9.zig+7
......@@ -956,6 +956,13 @@ pub fn allocateDeclIndexes(self: *Plan9, decl_index: Module.Decl.Index) !void {
956956 _ = self;
957957 _ = decl_index;
958958}
959/// Must be called only after a successful call to `updateDecl`.
960pub fn updateDeclLineNumber(self: *Plan9, mod: *Module, decl: *const Module.Decl) !void {
961 _ = self;
962 _ = mod;
963 _ = decl;
964}
965
959966pub fn getDeclVAddr(
960967 self: *Plan9,
961968 decl_index: Module.Decl.Index,
test/cases/plan9/exit.zig+1-1
......@@ -1,5 +1,5 @@
11pub fn main() void {}
22
33// run
4// target=x86_64-plan9,aarch64-plan9
4// target=x86_64-plan9
55//