stage2: tsan forces linking libc

This commit is contained in:
Andrew Kelley
2020-12-22 22:11:46 -07:00
parent 4d8c5dd4be
commit ed26b3204a

View File

@@ -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) {