aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacob G-W <jacoblevgw@gmail.com>2022-10-24 17:01:26 -0400
committerJacob G-W <jacoblevgw@gmail.com>2022-10-24 17:01:26 -0400
commit5aef54cbc83cce5c1afe9aededfc505d89559741 (patch)
treeaa3a60637123d531b5c7834e25019aa46aac82d5 /src
parentc6fb798740119b78def920c649c03a644fa2380b (diff)
downloadzig-5aef54cbc83cce5c1afe9aededfc505d89559741.tar.gz
zig-5aef54cbc83cce5c1afe9aededfc505d89559741.zip
additional fixes for Plan9
with this, the tests should pass
Diffstat (limited to 'src')
-rw-r--r--src/Compilation.zig6
-rw-r--r--src/link.zig2
-rw-r--r--src/link/Plan9.zig7
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index fc71da56f3..80787db37d 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1088,10 +1088,10 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
// Once they are capable this condition could be removed. When removing this condition,
// also test the use case of `build-obj -fcompiler-rt` with the native backends
// and make sure the compiler-rt symbols are emitted.
- const capable_of_building_compiler_rt = build_options.have_llvm;
+ const capable_of_building_compiler_rt = build_options.have_llvm and options.target.os.tag != .plan9;
- const capable_of_building_zig_libc = build_options.have_llvm;
- const capable_of_building_ssp = build_options.have_llvm;
+ const capable_of_building_zig_libc = build_options.have_llvm and options.target.os.tag != .plan9;
+ const capable_of_building_ssp = build_options.have_llvm and options.target.os.tag != .plan9;
const comp: *Compilation = comp: {
// For allocations that have the same lifetime as Compilation. This arena is used only during this
diff --git a/src/link.zig b/src/link.zig
index b0c8294482..dc11749921 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -581,7 +581,7 @@ pub const File = struct {
.macho => return @fieldParentPtr(MachO, "base", base).updateDeclLineNumber(module, decl),
.c => return @fieldParentPtr(C, "base", base).updateDeclLineNumber(module, decl),
.wasm => return @fieldParentPtr(Wasm, "base", base).updateDeclLineNumber(module, decl),
- .plan9 => @panic("TODO: implement updateDeclLineNumber for plan9"),
+ .plan9 => return @fieldParentPtr(Plan9, "base", base).updateDeclLineNumber(module, decl),
.spirv, .nvptx => {},
}
}
diff --git a/src/link/Plan9.zig b/src/link/Plan9.zig
index 86c3c1817b..f6acddc441 100644
--- a/src/link/Plan9.zig
+++ b/src/link/Plan9.zig
@@ -956,6 +956,13 @@ pub fn allocateDeclIndexes(self: *Plan9, decl_index: Module.Decl.Index) !void {
_ = self;
_ = decl_index;
}
+/// Must be called only after a successful call to `updateDecl`.
+pub fn updateDeclLineNumber(self: *Plan9, mod: *Module, decl: *const Module.Decl) !void {
+ _ = self;
+ _ = mod;
+ _ = decl;
+}
+
pub fn getDeclVAddr(
self: *Plan9,
decl_index: Module.Decl.Index,