| author | |
| committer | |
| log | 22b39f034b495176784f7ca295cf61c285958abe |
| tree | 2fceddfc70e114db17cce71b94d8840ffafc4522 |
| parent | 2cb6db22193acc802ff38f1cc4576ac1ee3f94fa |
2 files changed, 4 insertions(+), 2 deletions(-)
src/link/MachO.zig+2-1| ... | @@ -574,11 +574,12 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No | ... | @@ -574,11 +574,12 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No |
| 574 | var codesig = CodeSignature.init(self.page_size); | 574 | var codesig = CodeSignature.init(self.page_size); |
| 575 | codesig.code_directory.ident = self.base.options.emit.?.sub_path; | 575 | codesig.code_directory.ident = self.base.options.emit.?.sub_path; |
| 576 | if (self.base.options.entitlements) |path| { | 576 | if (self.base.options.entitlements) |path| { |
| 577 | try codesig.addEntitlements(arena, path); | 577 | try codesig.addEntitlements(self.base.allocator, path); |
| 578 | } | 578 | } |
| 579 | try self.writeCodeSignaturePadding(&codesig); | 579 | try self.writeCodeSignaturePadding(&codesig); |
| 580 | break :blk codesig; | 580 | break :blk codesig; |
| 581 | } else null; | 581 | } else null; |
| 582 | defer if (codesig) |*csig| csig.deinit(self.base.allocator); | ||
| 582 | 583 | ||
| 583 | // Write load commands | 584 | // Write load commands |
| 584 | var lc_buffer = std.ArrayList(u8).init(arena); | 585 | var lc_buffer = std.ArrayList(u8).init(arena); |
src/link/MachO/zld.zig+2-1| ... | @@ -4115,11 +4115,12 @@ pub fn linkWithZld(macho_file: *MachO, comp: *Compilation, prog_node: *std.Progr | ... | @@ -4115,11 +4115,12 @@ pub fn linkWithZld(macho_file: *MachO, comp: *Compilation, prog_node: *std.Progr |
| 4115 | var codesig = CodeSignature.init(page_size); | 4115 | var codesig = CodeSignature.init(page_size); |
| 4116 | codesig.code_directory.ident = fs.path.basename(full_out_path); | 4116 | codesig.code_directory.ident = fs.path.basename(full_out_path); |
| 4117 | if (options.entitlements) |path| { | 4117 | if (options.entitlements) |path| { |
| 4118 | try codesig.addEntitlements(arena, path); | 4118 | try codesig.addEntitlements(zld.gpa, path); |
| 4119 | } | 4119 | } |
| 4120 | try zld.writeCodeSignaturePadding(&codesig); | 4120 | try zld.writeCodeSignaturePadding(&codesig); |
| 4121 | break :blk codesig; | 4121 | break :blk codesig; |
| 4122 | } else null; | 4122 | } else null; |
| 4123 | defer if (codesig) |*csig| csig.deinit(zld.gpa); | ||
| 4123 | 4124 | ||
| 4124 | // Write load commands | 4125 | // Write load commands |
| 4125 | var lc_buffer = std.ArrayList(u8).init(arena); | 4126 | var lc_buffer = std.ArrayList(u8).init(arena); |