| ... | @@ -593,7 +593,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { | ... | @@ -593,7 +593,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 593 | break :outer opts; | 593 | break :outer opts; |
| 594 | } else .{}; | 594 | } else .{}; |
| 595 | | 595 | |
| 596 | const link_libc = options.link_libc or target_util.osRequiresLibC(options.target); | 596 | const tsan = options.want_tsan orelse false; |
| | 597 | |
| | 598 | const link_libc = options.link_libc or target_util.osRequiresLibC(options.target) or tsan; |
| 597 | | 599 | |
| 598 | const must_dynamic_link = dl: { | 600 | const must_dynamic_link = dl: { |
| 599 | if (target_util.cannotDynamicLink(options.target)) | 601 | if (target_util.cannotDynamicLink(options.target)) |
| ... | @@ -654,8 +656,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { | ... | @@ -654,8 +656,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 654 | options.libc_installation, | 656 | options.libc_installation, |
| 655 | ); | 657 | ); |
| 656 | | 658 | |
| 657 | const tsan = options.want_tsan orelse false; | | |
| 658 | | | |
| 659 | const must_pie = target_util.requiresPIE(options.target); | 659 | const must_pie = target_util.requiresPIE(options.target); |
| 660 | const pie: bool = if (options.want_pie) |explicit| pie: { | 660 | const pie: bool = if (options.want_pie) |explicit| pie: { |
| 661 | if (!explicit and must_pie) { | 661 | if (!explicit and must_pie) { |