diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-01-25 13:17:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-25 13:17:25 -0800 |
| commit | 8fa47bb904c888dadf20af5eb72b9643eed2bfea (patch) | |
| tree | 47fcc20146a7358b4216668d91c78d3bb712511d /src/libtsan.zig | |
| parent | 015a5e198246f782415586235e0da7085867eb22 (diff) | |
| parent | b60e39fe8f50783509e3cfe7a3888e1611b063c1 (diff) | |
| download | zig-8fa47bb904c888dadf20af5eb72b9643eed2bfea.tar.gz zig-8fa47bb904c888dadf20af5eb72b9643eed2bfea.zip | |
Merge pull request #22230 from alexrp/lto-stuff
Disable LTO by default + some LTO fixes
Diffstat (limited to 'src/libtsan.zig')
| -rw-r--r-- | src/libtsan.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libtsan.zig b/src/libtsan.zig index 8b2427df1b..cd28b8694a 100644 --- a/src/libtsan.zig +++ b/src/libtsan.zig @@ -53,6 +53,8 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo const optimize_mode = comp.compilerRtOptMode(); const strip = comp.compilerRtStrip(); const link_libcpp = target.isDarwin(); + const unwind_tables: std.builtin.UnwindTables = + if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .@"async"; const config = Compilation.Config.resolve(.{ .output_mode = output_mode, @@ -65,6 +67,9 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo .root_strip = strip, .link_libc = true, .link_libcpp = link_libcpp, + .any_unwind_tables = unwind_tables != .none, + // LLVM disables LTO for its libtsan. + .lto = .none, }) catch |err| { comp.setMiscFailure( .libtsan, @@ -95,6 +100,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo .red_zone = comp.root_mod.red_zone, .omit_frame_pointer = optimize_mode != .Debug and !target.os.tag.isDarwin(), .valgrind = false, + .unwind_tables = unwind_tables, .optimize_mode = optimize_mode, .structured_cfg = comp.root_mod.structured_cfg, .pic = true, |
