aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-19 16:21:20 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:21 -0700
commit3262e9cceee21279f1327e36bac1b5a9a7989cea (patch)
treea2bbab49c76854f5367b0327ec534fa894fe9e41 /src
parent3b36c4d0b30285ceb3576e621a4dc2b98a30d424 (diff)
downloadzig-3262e9cceee21279f1327e36bac1b5a9a7989cea.tar.gz
zig-3262e9cceee21279f1327e36bac1b5a9a7989cea.zip
zig build: fix logic for extracting executable file from Compilation
Diffstat (limited to 'src')
-rw-r--r--src/main.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 04cf9db12a..c165f724b8 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -5478,10 +5478,12 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
error.SemanticAnalyzeFail => process.exit(2),
else => |e| return e,
};
- try comp.makeBinFileExecutable();
- const emit = comp.bin_file.?.emit;
- child_argv.items[argv_index_exe] = try emit.directory.join(arena, &.{emit.sub_path});
+ // Since incremental compilation isn't done yet, we use cache_mode = whole
+ // above, and thus the output file is already closed.
+ //try comp.makeBinFileExecutable();
+ child_argv.items[argv_index_exe] =
+ try local_cache_directory.join(arena, &.{comp.cache_use.whole.bin_sub_path.?});
break :argv child_argv.items;
};