mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
lld+macho: rename final artefact in main.zig
This commit is contained in:
parent
b58a2a4de6
commit
3e2d1ccaad
@ -762,9 +762,6 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
|
||||
try self.writeHeader();
|
||||
// Generate adhoc code signature
|
||||
try self.writeCodeSignature();
|
||||
// Move file in-place to please the kernel
|
||||
const emit = self.base.options.emit.?;
|
||||
try emit.directory.handle.copyFile(emit.sub_path, emit.directory.handle, emit.sub_path, .{});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
src/main.zig
13
src/main.zig
@ -1773,8 +1773,16 @@ fn buildOutputType(
|
||||
error.SemanticAnalyzeFail => process.exit(1),
|
||||
else => |e| return e,
|
||||
};
|
||||
if (output_mode == .Exe) {
|
||||
try comp.makeBinFileExecutable();
|
||||
switch (output_mode) {
|
||||
.Exe => try comp.makeBinFileExecutable(),
|
||||
.Lib => {
|
||||
if (link_mode) |lm| {
|
||||
if (lm == .Dynamic) {
|
||||
try comp.makeBinFileExecutable();
|
||||
}
|
||||
}
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
|
||||
if (build_options.is_stage1 and comp.stage1_lock != null and watch) {
|
||||
@ -2413,6 +2421,7 @@ pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v
|
||||
defer comp.destroy();
|
||||
|
||||
try updateModule(gpa, comp, null, .none);
|
||||
try comp.makeBinFileExecutable();
|
||||
|
||||
child_argv.items[argv_index_exe] = try comp.bin_file.options.emit.?.directory.join(
|
||||
arena,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user