commit 60094cc3fc979df0928c412c9fded457172f2060 (tree)
parent f12ec02bd780f58d8c35b1fe80e0955c2591e0a4
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 9 Jan 2024 01:11:15 -0800
Merge pull request #18491 from ziglang/fix-mod-link-obj-path
std.Build.Step.Compile: fix link object paths
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
@@ -999,7 +999,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
switch (link_object) {
.static_path => |static_path| {
if (my_responsibility) {
- try zig_args.append(static_path.getPath(b));
+ try zig_args.append(static_path.getPath2(module.owner, step));
total_linker_objects += 1;
}
},
@@ -1119,7 +1119,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
try zig_args.append("--");
prev_has_cflags = false;
}
- try zig_args.append(asm_file.getPath(b));
+ try zig_args.append(asm_file.getPath2(module.owner, step));
total_linker_objects += 1;
},
@@ -1140,7 +1140,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
try zig_args.append("--");
prev_has_cflags = true;
}
- try zig_args.append(c_source_file.file.getPath(b));
+ try zig_args.append(c_source_file.file.getPath2(module.owner, step));
total_linker_objects += 1;
},
@@ -1191,7 +1191,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
try zig_args.append("--");
prev_has_rcflags = true;
}
- try zig_args.append(rc_source_file.file.getPath(b));
+ try zig_args.append(rc_source_file.file.getPath2(module.owner, step));
total_linker_objects += 1;
},
}
diff --git a/src/Compilation.zig b/src/Compilation.zig
@@ -2055,11 +2055,11 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void
const is_hit = man.hit() catch |err| {
const i = man.failed_file_index orelse return err;
const pp = man.files.items[i].prefixed_path orelse return err;
- const prefix = man.cache.prefixes()[pp.prefix].path orelse "";
+ const prefix = man.cache.prefixes()[pp.prefix];
return comp.setMiscFailure(
.check_whole_cache,
- "unable to check cache: stat file '{}{s}{s}' failed: {s}",
- .{ comp.local_cache_directory, prefix, pp.sub_path, @errorName(err) },
+ "unable to check cache: stat file '{}{s}' failed: {s}",
+ .{ prefix, pp.sub_path, @errorName(err) },
);
};
if (is_hit) {