link-tests: test pagezero_size option for macho

This commit is contained in:
Jakub Konka
2022-06-20 18:25:20 +02:00
parent 6e56a8df20
commit 2d09540a63
4 changed files with 48 additions and 0 deletions

View File

@@ -1582,6 +1582,9 @@ pub const LibExeObjStep = struct {
/// (Darwin) Path to entitlements file
entitlements: ?[]const u8 = null,
/// (Darwin) Size of the pagezero segment.
pagezero_size: ?u64 = null,
/// Position Independent Code
force_pic: ?bool = null,
@@ -2638,6 +2641,10 @@ pub const LibExeObjStep = struct {
if (self.entitlements) |entitlements| {
try zig_args.appendSlice(&[_][]const u8{ "--entitlements", entitlements });
}
if (self.pagezero_size) |pagezero_size| {
const size = try std.fmt.allocPrint(builder.allocator, "{x}", .{pagezero_size});
try zig_args.appendSlice(&[_][]const u8{ "-pagezero_size", size });
}
if (self.bundle_compiler_rt) |x| {
if (x) {