aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2023-01-01 22:43:09 -0500
committerJakub Konka <kubkon@jakubkonka.com>2023-01-03 19:45:09 +0100
commit8032ecb73040f837d7232216b16ae7edaacbc867 (patch)
tree7933c36d213ab3827bc42681ffc11cea6797c347
parent755f50a986f429f7395848e883e154c3ab6c3f26 (diff)
downloadzig-8032ecb73040f837d7232216b16ae7edaacbc867.tar.gz
zig-8032ecb73040f837d7232216b16ae7edaacbc867.zip
stage3 macos: enable -headerpad_max_install_names
This pads the install names area in final (stage3) zig executable on macos. The executable size grows by 4096 bytes, or roughly 0.002% . closes #13388
-rw-r--r--build.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index fc75e284da..c11329dbf3 100644
--- a/build.zig
+++ b/build.zig
@@ -532,6 +532,10 @@ fn addCmakeCfgOptionsToExe(
exe: *std.build.LibExeObjStep,
use_zig_libcxx: bool,
) !void {
+ if (exe.target.isDarwin()) {
+ // useful for package maintainers
+ exe.headerpad_max_install_names = true;
+ }
exe.addObjectFile(fs.path.join(b.allocator, &[_][]const u8{
cfg.cmake_binary_dir,
"zigcpp",