macho: address review comments

This commit is contained in:
Jakub Konka 2020-12-19 09:59:38 +01:00
parent b42ef0e6ea
commit 3f81ddb735
2 changed files with 2 additions and 5 deletions

View File

@ -553,9 +553,6 @@ fn add_include_dirs(comp: *Compilation, arena: *Allocator, args: *std.ArrayList(
try args.append("-I");
try args.append(try lib_path(comp, arena, lib_libc ++ "include" ++ s ++ "any-linux-any"));
try args.append("-I");
try args.append(try lib_path(comp, arena, lib_libc ++ "include" ++ s ++ "any-macos-any"));
}
fn add_include_dirs_arch(

View File

@ -854,8 +854,8 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
try self.writeLoadCommands();
try self.writeHeader();
}
if (self.code_signature_cmd_index == null) {
if (target.cpu.arch != .aarch64) return; // This is currently needed only for aarch64 targets.
if (self.code_signature_cmd_index == null) outer: {
if (target.cpu.arch != .aarch64) break :outer; // This is currently needed only for aarch64 targets.
const text_segment = self.load_commands.items[self.text_segment_cmd_index.?].Segment;
const text_section = text_segment.sections.items[self.text_section_index.?];
const after_last_cmd_offset = self.header.?.sizeofcmds + @sizeOf(macho.mach_header_64);