aboutsummaryrefslogtreecommitdiff
path: root/src/link/Plan9.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-06 21:29:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-10-08 16:54:31 -0700
commitf708c5fafc5087a2518e0dc7acf986b59673dddd (patch)
tree0520ae635c4a0b643ba9b33cb6fcdf1ff08e115e /src/link/Plan9.zig
parent1c0d6f9c0020188326560e058baf36b8034d76e5 (diff)
downloadzig-f708c5fafc5087a2518e0dc7acf986b59673dddd.tar.gz
zig-f708c5fafc5087a2518e0dc7acf986b59673dddd.zip
CLI: finish updating module API usage
Finish the work started in 4c4fb839972f66f55aa44fc0aca5f80b0608c731. Now the compiler compiles again. Wire up dependency tree fetching code in the CLI for `zig build`. Everything is hooked up except for `createDependenciesModule` is not yet implemented.
Diffstat (limited to 'src/link/Plan9.zig')
-rw-r--r--src/link/Plan9.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/link/Plan9.zig b/src/link/Plan9.zig
index b519fdda00..3dcef859ae 100644
--- a/src/link/Plan9.zig
+++ b/src/link/Plan9.zig
@@ -352,9 +352,12 @@ fn putFn(self: *Plan9, decl_index: Module.Decl.Index, out: FnDeclOutput) !void {
// getting the full file path
var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
- const dir = file.pkg.root_src_directory.path orelse try std.os.getcwd(&buf);
- const sub_path = try std.fs.path.join(arena, &.{ dir, file.sub_file_path });
- try self.addPathComponents(sub_path, &a);
+ const full_path = try std.fs.path.join(arena, &.{
+ file.mod.root.root_dir.path orelse try std.os.getcwd(&buf),
+ file.mod.root.sub_path,
+ file.sub_file_path,
+ });
+ try self.addPathComponents(full_path, &a);
// null terminate
try a.append(0);