Skip to content

Commit

Permalink
apple: dead-strip
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Dec 26, 2023
1 parent 13fe97d commit 05cbb52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pub fn buildSokol(b: *Builder, target: CrossTarget, optimize: OptimizeMode, conf
.flags = &[_][]const u8{ "-ObjC", "-DIMPL", backend_option },
});
}
lib.dead_strip_dylibs = true;
lib.linkFramework("Foundation");
lib.linkFramework("AudioToolbox");
if (.metal == _backend) {
Expand Down Expand Up @@ -423,7 +424,7 @@ fn buildLDC(b: *Builder, lib: *Builder.CompileStep, comptime config: ldcConfig)
}
}

if (lib.verbose_cc)
if (b.verbose)
try cmds.append("-v");

if (lib.sanitize_thread)
Expand Down
1 change: 1 addition & 0 deletions tools/zigcc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub fn main() !void {
if (std.mem.eql(u8, arg, std.fmt.comptimePrint("{s}-apple-{s}", .{ @tagName(builtin.cpu.arch), @tagName(builtin.os.tag) }))) {
try cmds.append("native-native");
try cmds.append("-lunwind");
try cmds.append("-fapple-link-rtlib");
} else try cmds.append(arg);
}
var proc = std.ChildProcess.init(cmds.items, allocator);
Expand Down

0 comments on commit 05cbb52

Please sign in to comment.