mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 15:43:06 +00:00
tsan: add workaround for TSAN Apple bug
Addresses TSAN bug on Apple platforms by always setting the headerpad size to a non-zero value when building the TSAN dylib.
This commit is contained in:
parent
c9d19ebb7a
commit
76c3b6b794
@ -290,6 +290,8 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
|
||||
try std.fmt.allocPrintZ(arena, "@rpath/{s}", .{basename})
|
||||
else
|
||||
null;
|
||||
// This is temp conditional on resolving https://github.com/llvm/llvm-project/issues/97627 upstream.
|
||||
const headerpad_size: ?u32 = if (target.isDarwin()) 32 else null;
|
||||
const sub_compilation = Compilation.create(comp.gpa, arena, .{
|
||||
.local_cache_directory = comp.global_cache_directory,
|
||||
.global_cache_directory = comp.global_cache_directory,
|
||||
@ -315,6 +317,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
|
||||
.skip_linker_dependencies = skip_linker_dependencies,
|
||||
.linker_allow_shlib_undefined = linker_allow_shlib_undefined,
|
||||
.install_name = install_name,
|
||||
.headerpad_size = headerpad_size,
|
||||
}) catch |err| {
|
||||
comp.setMiscFailure(
|
||||
.libtsan,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user