From ed26b3204a3028fbc7d05a03b7e995d2f0de7a75 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 22 Dec 2020 22:11:46 -0700 Subject: stage2: tsan forces linking libc --- src/Compilation.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 5c38d131e6..010ac96b6f 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -593,7 +593,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { break :outer opts; } else .{}; - const link_libc = options.link_libc or target_util.osRequiresLibC(options.target); + const tsan = options.want_tsan orelse false; + + const link_libc = options.link_libc or target_util.osRequiresLibC(options.target) or tsan; const must_dynamic_link = dl: { if (target_util.cannotDynamicLink(options.target)) @@ -654,8 +656,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { options.libc_installation, ); - const tsan = options.want_tsan orelse false; - const must_pie = target_util.requiresPIE(options.target); const pie: bool = if (options.want_pie) |explicit| pie: { if (!explicit and must_pie) { -- cgit v1.2.3