authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-19 16:21:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-01 17:51:21-07:00
log3262e9cceee21279f1327e36bac1b5a9a7989cea
treea2bbab49c76854f5367b0327ec534fa894fe9e41
parent3b36c4d0b30285ceb3576e621a4dc2b98a30d424

zig build: fix logic for extracting executable file from Compilation


1 files changed, 5 insertions(+), 3 deletions(-)

src/main.zig+5-3
...@@ -5478,10 +5478,12 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi...@@ -5478,10 +5478,12 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
5478 error.SemanticAnalyzeFail => process.exit(2),5478 error.SemanticAnalyzeFail => process.exit(2),
5479 else => |e| return e,5479 else => |e| return e,
5480 };5480 };
5481 try comp.makeBinFileExecutable();
54825481
5483 const emit = comp.bin_file.?.emit;5482 // Since incremental compilation isn't done yet, we use cache_mode = whole
5484 child_argv.items[argv_index_exe] = try emit.directory.join(arena, &.{emit.sub_path});5483 // above, and thus the output file is already closed.
5484 //try comp.makeBinFileExecutable();
5485 child_argv.items[argv_index_exe] =
5486 try local_cache_directory.join(arena, &.{comp.cache_use.whole.bin_sub_path.?});
54855487
5486 break :argv child_argv.items;5488 break :argv child_argv.items;
5487 };5489 };