diff options
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 2646da2f6f..98d69ee78e 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -903,6 +903,8 @@ pub const InitOptions = struct { install_name: ?[]const u8 = null, /// (Darwin) Path to entitlements file entitlements: ?[]const u8 = null, + /// (Darwin) size of the __PAGEZERO segment + pagezero_size: ?u64 = null, }; fn addPackageTableToCacheHash( @@ -2359,7 +2361,7 @@ fn prepareWholeEmitSubPath(arena: Allocator, opt_emit: ?EmitLoc) error{OutOfMemo /// to remind the programmer to update multiple related pieces of code that /// are in different locations. Bump this number when adding or deleting /// anything from the link cache manifest. -pub const link_hash_implementation_version = 3; +pub const link_hash_implementation_version = 4; fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifest) !void { const gpa = comp.gpa; @@ -2369,7 +2371,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes defer arena_allocator.deinit(); const arena = arena_allocator.allocator(); - comptime assert(link_hash_implementation_version == 3); + comptime assert(link_hash_implementation_version == 4); if (comp.bin_file.options.module) |mod| { const main_zig_file = try mod.main_pkg.root_src_directory.join(arena, &[_][]const u8{ @@ -2474,6 +2476,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes man.hash.addListOfBytes(comp.bin_file.options.framework_dirs); man.hash.addListOfBytes(comp.bin_file.options.frameworks); try man.addOptionalFile(comp.bin_file.options.entitlements); + if (comp.bin_file.options.pagezero_size) |value| man.hash.add(value); // COFF specific stuff man.hash.addOptional(comp.bin_file.options.subsystem); |
