diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-12-22 22:11:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-24 01:18:48 -0700 |
| commit | ed26b3204a3028fbc7d05a03b7e995d2f0de7a75 (patch) | |
| tree | c3af6b11a5d070a1239b229ba1c8d7d8caa2a48c /src | |
| parent | 4d8c5dd4be7a84c5f01f8910c44c5a1e23740b77 (diff) | |
| download | zig-ed26b3204a3028fbc7d05a03b7e995d2f0de7a75.tar.gz zig-ed26b3204a3028fbc7d05a03b7e995d2f0de7a75.zip | |
stage2: tsan forces linking libc
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |
