authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-09 01:11:15-08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-01-09 01:11:15-08:00
log60094cc3fc979df0928c412c9fded457172f2060
treea5dae37962a8cf38d257609a87b7dce5dc2e579d
parentf12ec02bd780f58d8c35b1fe80e0955c2591e0a4
parentcf5a5dc8b521a145112e9619563cc72d3c26c0e9
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #18491 from ziglang/fix-mod-link-obj-path

std.Build.Step.Compile: fix link object paths

2 files changed, 7 insertions(+), 7 deletions(-)

lib/std/Build/Step/Compile.zig+4-4
...@@ -999,7 +999,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {...@@ -999,7 +999,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
999 switch (link_object) {999 switch (link_object) {
1000 .static_path => |static_path| {1000 .static_path => |static_path| {
1001 if (my_responsibility) {1001 if (my_responsibility) {
1002 try zig_args.append(static_path.getPath(b));1002 try zig_args.append(static_path.getPath2(module.owner, step));
1003 total_linker_objects += 1;1003 total_linker_objects += 1;
1004 }1004 }
1005 },1005 },
...@@ -1119,7 +1119,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {...@@ -1119,7 +1119,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
1119 try zig_args.append("--");1119 try zig_args.append("--");
1120 prev_has_cflags = false;1120 prev_has_cflags = false;
1121 }1121 }
1122 try zig_args.append(asm_file.getPath(b));1122 try zig_args.append(asm_file.getPath2(module.owner, step));
1123 total_linker_objects += 1;1123 total_linker_objects += 1;
1124 },1124 },
11251125
...@@ -1140,7 +1140,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {...@@ -1140,7 +1140,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
1140 try zig_args.append("--");1140 try zig_args.append("--");
1141 prev_has_cflags = true;1141 prev_has_cflags = true;
1142 }1142 }
1143 try zig_args.append(c_source_file.file.getPath(b));1143 try zig_args.append(c_source_file.file.getPath2(module.owner, step));
1144 total_linker_objects += 1;1144 total_linker_objects += 1;
1145 },1145 },
11461146
...@@ -1191,7 +1191,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {...@@ -1191,7 +1191,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
1191 try zig_args.append("--");1191 try zig_args.append("--");
1192 prev_has_rcflags = true;1192 prev_has_rcflags = true;
1193 }1193 }
1194 try zig_args.append(rc_source_file.file.getPath(b));1194 try zig_args.append(rc_source_file.file.getPath2(module.owner, step));
1195 total_linker_objects += 1;1195 total_linker_objects += 1;
1196 },1196 },
1197 }1197 }
src/Compilation.zig+3-3
...@@ -2055,11 +2055,11 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void...@@ -2055,11 +2055,11 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void
2055 const is_hit = man.hit() catch |err| {2055 const is_hit = man.hit() catch |err| {
2056 const i = man.failed_file_index orelse return err;2056 const i = man.failed_file_index orelse return err;
2057 const pp = man.files.items[i].prefixed_path orelse return err;2057 const pp = man.files.items[i].prefixed_path orelse return err;
2058 const prefix = man.cache.prefixes()[pp.prefix].path orelse "";2058 const prefix = man.cache.prefixes()[pp.prefix];
2059 return comp.setMiscFailure(2059 return comp.setMiscFailure(
2060 .check_whole_cache,2060 .check_whole_cache,
2061 "unable to check cache: stat file '{}{s}{s}' failed: {s}",2061 "unable to check cache: stat file '{}{s}' failed: {s}",
2062 .{ comp.local_cache_directory, prefix, pp.sub_path, @errorName(err) },2062 .{ prefix, pp.sub_path, @errorName(err) },
2063 );2063 );
2064 };2064 };
2065 if (is_hit) {2065 if (is_hit) {