| ... | @@ -1144,11 +1144,14 @@ pub fn flushModule(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_nod | ... | @@ -1144,11 +1144,14 @@ pub fn flushModule(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_nod |
| 1144 | _ = try rpath_table.put(rpath, {}); | 1144 | _ = try rpath_table.put(rpath, {}); |
| 1145 | } | 1145 | } |
| 1146 | | 1146 | |
| 1147 | // TSAN | | |
| 1148 | if (comp.config.any_sanitize_thread) { | 1147 | if (comp.config.any_sanitize_thread) { |
| 1149 | try positionals.append(.{ .path = comp.tsan_lib.?.full_object_path }); | 1148 | try positionals.append(.{ .path = comp.tsan_lib.?.full_object_path }); |
| 1150 | } | 1149 | } |
| 1151 | | 1150 | |
| | 1151 | if (comp.config.any_fuzz) { |
| | 1152 | try positionals.append(.{ .path = comp.fuzzer_lib.?.full_object_path }); |
| | 1153 | } |
| | 1154 | |
| 1152 | // libc | 1155 | // libc |
| 1153 | if (!comp.skip_linker_dependencies and !comp.config.link_libc) { | 1156 | if (!comp.skip_linker_dependencies and !comp.config.link_libc) { |
| 1154 | if (comp.libc_static_lib) |lib| { | 1157 | if (comp.libc_static_lib) |lib| { |
| ... | @@ -1607,6 +1610,10 @@ fn dumpArgv(self: *Elf, comp: *Compilation) !void { | ... | @@ -1607,6 +1610,10 @@ fn dumpArgv(self: *Elf, comp: *Compilation) !void { |
| 1607 | try argv.append(comp.tsan_lib.?.full_object_path); | 1610 | try argv.append(comp.tsan_lib.?.full_object_path); |
| 1608 | } | 1611 | } |
| 1609 | | 1612 | |
| | 1613 | if (comp.config.any_fuzz) { |
| | 1614 | try argv.append(comp.fuzzer_lib.?.full_object_path); |
| | 1615 | } |
| | 1616 | |
| 1610 | // libc | 1617 | // libc |
| 1611 | if (!comp.skip_linker_dependencies and !comp.config.link_libc) { | 1618 | if (!comp.skip_linker_dependencies and !comp.config.link_libc) { |
| 1612 | if (comp.libc_static_lib) |lib| { | 1619 | if (comp.libc_static_lib) |lib| { |
| ... | @@ -2272,6 +2279,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s | ... | @@ -2272,6 +2279,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 2272 | man.hash.add(self.bind_global_refs_locally); | 2279 | man.hash.add(self.bind_global_refs_locally); |
| 2273 | man.hash.add(self.compress_debug_sections); | 2280 | man.hash.add(self.compress_debug_sections); |
| 2274 | man.hash.add(comp.config.any_sanitize_thread); | 2281 | man.hash.add(comp.config.any_sanitize_thread); |
| | 2282 | man.hash.add(comp.config.any_fuzz); |
| 2275 | man.hash.addOptionalBytes(comp.sysroot); | 2283 | man.hash.addOptionalBytes(comp.sysroot); |
| 2276 | | 2284 | |
| 2277 | // We don't actually care whether it's a cache hit or miss; we just need the digest and the lock. | 2285 | // We don't actually care whether it's a cache hit or miss; we just need the digest and the lock. |
| ... | @@ -2616,6 +2624,10 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s | ... | @@ -2616,6 +2624,10 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 2616 | try argv.append(comp.tsan_lib.?.full_object_path); | 2624 | try argv.append(comp.tsan_lib.?.full_object_path); |
| 2617 | } | 2625 | } |
| 2618 | | 2626 | |
| | 2627 | if (comp.config.any_fuzz) { |
| | 2628 | try argv.append(comp.fuzzer_lib.?.full_object_path); |
| | 2629 | } |
| | 2630 | |
| 2619 | // libc | 2631 | // libc |
| 2620 | if (is_exe_or_dyn_lib and | 2632 | if (is_exe_or_dyn_lib and |
| 2621 | !comp.skip_linker_dependencies and | 2633 | !comp.skip_linker_dependencies and |