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...@@ -2363,7 +2363,7 @@ fn prepareWholeEmitSubPath(arena: Allocator, opt_emit: ?EmitLoc) error{OutOfMemo
2363/// to remind the programmer to update multiple related pieces of code that2363/// to remind the programmer to update multiple related pieces of code that
2364/// are in different locations. Bump this number when adding or deleting2364/// are in different locations. Bump this number when adding or deleting
2365/// anything from the link cache manifest.2365/// anything from the link cache manifest.
2366pub const link_hash_implementation_version = 4;2366pub const link_hash_implementation_version = 5;
23672367
2368fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifest) !void {2368fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifest) !void {
2369 const gpa = comp.gpa;2369 const gpa = comp.gpa;
...@@ -2373,7 +2373,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes...@@ -2373,7 +2373,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
2373 defer arena_allocator.deinit();2373 defer arena_allocator.deinit();
2374 const arena = arena_allocator.allocator();2374 const arena = arena_allocator.allocator();
23752375
2376 comptime assert(link_hash_implementation_version == 4);2376 comptime assert(link_hash_implementation_version == 5);
23772377
2378 if (comp.bin_file.options.module) |mod| {2378 if (comp.bin_file.options.module) |mod| {
2379 const main_zig_file = try mod.main_pkg.root_src_directory.join(arena, &[_][]const u8{2379 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...@@ -2479,6 +2479,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
2479 man.hash.addListOfBytes(comp.bin_file.options.frameworks);2479 man.hash.addListOfBytes(comp.bin_file.options.frameworks);
2480 try man.addOptionalFile(comp.bin_file.options.entitlements);2480 try man.addOptionalFile(comp.bin_file.options.entitlements);
2481 man.hash.addOptional(comp.bin_file.options.pagezero_size);2481 man.hash.addOptional(comp.bin_file.options.pagezero_size);
2482 man.hash.addOptional(comp.bin_file.options.search_strategy);
24822483
2483 // COFF specific stuff2484 // COFF specific stuff
2484 man.hash.addOptional(comp.bin_file.options.subsystem);2485 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) !...@@ -969,7 +969,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Node) !
969 man = comp.cache_parent.obtain();969 man = comp.cache_parent.obtain();
970 self.base.releaseLock();970 self.base.releaseLock();
971971
972 comptime assert(Compilation.link_hash_implementation_version == 4);972 comptime assert(Compilation.link_hash_implementation_version == 5);
973973
974 for (self.base.options.objects) |obj| {974 for (self.base.options.objects) |obj| {
975 _ = try man.addFile(obj.path, null);975 _ = 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...@@ -1298,7 +1298,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v
1298 // We are about to obtain this lock, so here we give other processes a chance first.1298 // We are about to obtain this lock, so here we give other processes a chance first.
1299 self.base.releaseLock();1299 self.base.releaseLock();
13001300
1301 comptime assert(Compilation.link_hash_implementation_version == 4);1301 comptime assert(Compilation.link_hash_implementation_version == 5);
13021302
1303 try man.addOptionalFile(self.base.options.linker_script);1303 try man.addOptionalFile(self.base.options.linker_script);
1304 try man.addOptionalFile(self.base.options.version_script);1304 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...@@ -541,7 +541,7 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
541 // We are about to obtain this lock, so here we give other processes a chance first.541 // We are about to obtain this lock, so here we give other processes a chance first.
542 self.base.releaseLock();542 self.base.releaseLock();
543543
544 comptime assert(Compilation.link_hash_implementation_version == 4);544 comptime assert(Compilation.link_hash_implementation_version == 5);
545545
546 for (self.base.options.objects) |obj| {546 for (self.base.options.objects) |obj| {
547 _ = try man.addFile(obj.path, null);547 _ = try man.addFile(obj.path, null);
...@@ -555,6 +555,7 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No...@@ -555,6 +555,7 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
555 // installation sources because they are always a product of the compiler version + target information.555 // installation sources because they are always a product of the compiler version + target information.
556 man.hash.add(stack_size);556 man.hash.add(stack_size);
557 man.hash.addOptional(self.base.options.pagezero_size);557 man.hash.addOptional(self.base.options.pagezero_size);
558 man.hash.addOptional(self.base.options.search_strategy);
558 man.hash.addListOfBytes(self.base.options.lib_dirs);559 man.hash.addListOfBytes(self.base.options.lib_dirs);
559 man.hash.addListOfBytes(self.base.options.framework_dirs);560 man.hash.addListOfBytes(self.base.options.framework_dirs);
560 man.hash.addListOfBytes(self.base.options.frameworks);561 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) !...@@ -2481,7 +2481,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) !
2481 // We are about to obtain this lock, so here we give other processes a chance first.2481 // We are about to obtain this lock, so here we give other processes a chance first.
2482 self.base.releaseLock();2482 self.base.releaseLock();
24832483
2484 comptime assert(Compilation.link_hash_implementation_version == 4);2484 comptime assert(Compilation.link_hash_implementation_version == 5);
24852485
2486 for (self.base.options.objects) |obj| {2486 for (self.base.options.objects) |obj| {
2487 _ = try man.addFile(obj.path, null);2487 _ = try man.addFile(obj.path, null);