From eb8b5488cd56f42c51cfe8b54ec22716d2f05232 Mon Sep 17 00:00:00 2001 From: Tom Read Cutting Date: Fri, 17 Feb 2023 13:34:49 +0000 Subject: [PATCH] These changes get things working on my new mac... not sure why --- src/archive/Archive.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/archive/Archive.zig b/src/archive/Archive.zig index 620c474..c9b78d2 100644 --- a/src/archive/Archive.zig +++ b/src/archive/Archive.zig @@ -321,8 +321,8 @@ pub fn getDefaultArchiveTypeFromHost() ArchiveType { // inferred up to this point. // TODO: Figure out why this is needed to pass tests on macOS as this seems // to contradict docs/code? + if (builtin.os.tag.isDarwin()) return .darwin; return .gnu; - // if (builtin.os.tag.isDarwin()) return .darwin; // switch (builtin.os.tag) { // .windows => return .coff, // else => return .gnu, @@ -614,8 +614,7 @@ pub fn finalize(self: *Archive, allocator: Allocator) (FinalizeError || HandledI // BSD format: Write the symbol table // In darwin if symbol table writing is enabled the expected behaviour // is that we write an empty symbol table! - const write_symbol_table = - self.modifiers.build_symbol_table and (self.symbols.items.len != 0 or self.output_archive_type != .bsd); + const write_symbol_table = self.modifiers.build_symbol_table; if (write_symbol_table) { const tracy_scope = traceNamed(@src(), "Write Symbol Table"); defer tracy_scope.end();