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