| ... | ... | @@ -53,6 +53,8 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo |
| 53 | 53 | const optimize_mode = comp.compilerRtOptMode(); |
| 54 | 54 | const strip = comp.compilerRtStrip(); |
| 55 | 55 | const link_libcpp = target.isDarwin(); |
| 56 | const unwind_tables: std.builtin.UnwindTables = |
| 57 | if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .@"async"; |
| 56 | 58 | |
| 57 | 59 | const config = Compilation.Config.resolve(.{ |
| 58 | 60 | .output_mode = output_mode, |
| ... | ... | @@ -65,6 +67,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo |
| 65 | 67 | .root_strip = strip, |
| 66 | 68 | .link_libc = true, |
| 67 | 69 | .link_libcpp = link_libcpp, |
| 70 | .any_unwind_tables = unwind_tables != .none, |
| 68 | 71 | // LLVM disables LTO for its libtsan. |
| 69 | 72 | .lto = .none, |
| 70 | 73 | }) catch |err| { |
| ... | ... | @@ -97,6 +100,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo |
| 97 | 100 | .red_zone = comp.root_mod.red_zone, |
| 98 | 101 | .omit_frame_pointer = optimize_mode != .Debug and !target.os.tag.isDarwin(), |
| 99 | 102 | .valgrind = false, |
| 103 | .unwind_tables = unwind_tables, |
| 100 | 104 | .optimize_mode = optimize_mode, |
| 101 | 105 | .structured_cfg = comp.root_mod.structured_cfg, |
| 102 | 106 | .pic = true, |