| ... | @@ -2076,10 +2076,6 @@ pub fn addCCArgs( | ... | @@ -2076,10 +2076,6 @@ pub fn addCCArgs( |
| 2076 | try argv.append("-ffunction-sections"); | 2076 | try argv.append("-ffunction-sections"); |
| 2077 | } | 2077 | } |
| 2078 | | 2078 | |
| 2079 | if (comp.bin_file.options.tsan) { | | |
| 2080 | try argv.append("-fsanitize=thread"); | | |
| 2081 | } | | |
| 2082 | | | |
| 2083 | try argv.ensureCapacity(argv.items.len + comp.bin_file.options.framework_dirs.len * 2); | 2079 | try argv.ensureCapacity(argv.items.len + comp.bin_file.options.framework_dirs.len * 2); |
| 2084 | for (comp.bin_file.options.framework_dirs) |framework_dir| { | 2080 | for (comp.bin_file.options.framework_dirs) |framework_dir| { |
| 2085 | argv.appendAssumeCapacity("-iframework"); | 2081 | argv.appendAssumeCapacity("-iframework"); |
| ... | @@ -2203,9 +2199,14 @@ pub fn addCCArgs( | ... | @@ -2203,9 +2199,14 @@ pub fn addCCArgs( |
| 2203 | try argv.append("-fomit-frame-pointer"); | 2199 | try argv.append("-fomit-frame-pointer"); |
| 2204 | } | 2200 | } |
| 2205 | | 2201 | |
| 2206 | if (comp.sanitize_c) { | 2202 | if (comp.sanitize_c and !comp.bin_file.options.tsan) { |
| 2207 | try argv.append("-fsanitize=undefined"); | 2203 | try argv.append("-fsanitize=undefined"); |
| 2208 | try argv.append("-fsanitize-trap=undefined"); | 2204 | try argv.append("-fsanitize-trap=undefined"); |
| | 2205 | } else if (comp.sanitize_c and comp.bin_file.options.tsan) { |
| | 2206 | try argv.append("-fsanitize=undefined,thread"); |
| | 2207 | try argv.append("-fsanitize-trap=undefined"); |
| | 2208 | } else if (!comp.sanitize_c and comp.bin_file.options.tsan) { |
| | 2209 | try argv.append("-fsanitize=thread"); |
| 2209 | } | 2210 | } |
| 2210 | | 2211 | |
| 2211 | switch (comp.bin_file.options.optimize_mode) { | 2212 | switch (comp.bin_file.options.optimize_mode) { |