zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7d538d6e536aedc3d71c806b8831c73bb5dd0c62 (tree)
parent be6a81d3a70818ed143d004727d352f552384af5
Author: Michael Dusan <michael.dusan@gmail.com>
Date:   Sun,  1 Jan 2023 22:43:09 -0500

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

Diffstat:
Mbuild.zig | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/build.zig b/build.zig @@ -569,6 +569,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",