authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-06-25 10:50:00+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-06-25 10:50:00+02:00
logdfdb807543a03eec27341deec6a5f3b88f87fac3
tree7a5722c848921314e3ff464ea703bab6fc037db9
parent24821dd17f3a23d9fb496ff8fa5dcbefb5b1d18d

cache setting macho search strategy flags


5 files changed, 8 insertions(+), 6 deletions(-)

src/Compilation.zig+3-2
......@@ -2363,7 +2363,7 @@ fn prepareWholeEmitSubPath(arena: Allocator, opt_emit: ?EmitLoc) error{OutOfMemo
23632363/// to remind the programmer to update multiple related pieces of code that
23642364/// are in different locations. Bump this number when adding or deleting
23652365/// anything from the link cache manifest.
2366pub const link_hash_implementation_version = 4;
2366pub const link_hash_implementation_version = 5;
23672367
23682368fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifest) !void {
23692369 const gpa = comp.gpa;
......@@ -2373,7 +2373,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
23732373 defer arena_allocator.deinit();
23742374 const arena = arena_allocator.allocator();
23752375
2376 comptime assert(link_hash_implementation_version == 4);
2376 comptime assert(link_hash_implementation_version == 5);
23772377
23782378 if (comp.bin_file.options.module) |mod| {
23792379 const main_zig_file = try mod.main_pkg.root_src_directory.join(arena, &[_][]const u8{
......@@ -2479,6 +2479,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
24792479 man.hash.addListOfBytes(comp.bin_file.options.frameworks);
24802480 try man.addOptionalFile(comp.bin_file.options.entitlements);
24812481 man.hash.addOptional(comp.bin_file.options.pagezero_size);
2482 man.hash.addOptional(comp.bin_file.options.search_strategy);
24822483
24832484 // COFF specific stuff
24842485 man.hash.addOptional(comp.bin_file.options.subsystem);
src/link/Coff.zig+1-1
......@@ -969,7 +969,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Node) !
969969 man = comp.cache_parent.obtain();
970970 self.base.releaseLock();
971971
972 comptime assert(Compilation.link_hash_implementation_version == 4);
972 comptime assert(Compilation.link_hash_implementation_version == 5);
973973
974974 for (self.base.options.objects) |obj| {
975975 _ = try man.addFile(obj.path, null);
src/link/Elf.zig+1-1
......@@ -1298,7 +1298,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v
12981298 // We are about to obtain this lock, so here we give other processes a chance first.
12991299 self.base.releaseLock();
13001300
1301 comptime assert(Compilation.link_hash_implementation_version == 4);
1301 comptime assert(Compilation.link_hash_implementation_version == 5);
13021302
13031303 try man.addOptionalFile(self.base.options.linker_script);
13041304 try man.addOptionalFile(self.base.options.version_script);
src/link/MachO.zig+2-1
......@@ -541,7 +541,7 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
541541 // We are about to obtain this lock, so here we give other processes a chance first.
542542 self.base.releaseLock();
543543
544 comptime assert(Compilation.link_hash_implementation_version == 4);
544 comptime assert(Compilation.link_hash_implementation_version == 5);
545545
546546 for (self.base.options.objects) |obj| {
547547 _ = try man.addFile(obj.path, null);
......@@ -555,6 +555,7 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
555555 // installation sources because they are always a product of the compiler version + target information.
556556 man.hash.add(stack_size);
557557 man.hash.addOptional(self.base.options.pagezero_size);
558 man.hash.addOptional(self.base.options.search_strategy);
558559 man.hash.addListOfBytes(self.base.options.lib_dirs);
559560 man.hash.addListOfBytes(self.base.options.framework_dirs);
560561 man.hash.addListOfBytes(self.base.options.frameworks);
src/link/Wasm.zig+1-1
......@@ -2481,7 +2481,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) !
24812481 // We are about to obtain this lock, so here we give other processes a chance first.
24822482 self.base.releaseLock();
24832483
2484 comptime assert(Compilation.link_hash_implementation_version == 4);
2484 comptime assert(Compilation.link_hash_implementation_version == 5);
24852485
24862486 for (self.base.options.objects) |obj| {
24872487 _ = try man.addFile(obj.path, null);