| ... | ... | @@ -92,7 +92,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 92 | 92 | |
| 93 | 93 | try cflags.append("-nostdinc++"); |
| 94 | 94 | try cflags.append("-fvisibility-inlines-hidden"); |
| 95 | | try cflags.append("-std=c++14"); |
| 95 | try cflags.append("-std=c++17"); |
| 96 | 96 | try cflags.append("-fno-rtti"); |
| 97 | 97 | |
| 98 | 98 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -102,10 +102,11 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 102 | 102 | }); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | | const platform_tsan_sources = if (target.isDarwin()) |
| 106 | | &darwin_tsan_sources |
| 107 | | else |
| 108 | | &unix_tsan_sources; |
| 105 | const platform_tsan_sources = switch (target.os.tag) { |
| 106 | .ios, .macos, .watchos, .tvos => &darwin_tsan_sources, |
| 107 | .windows => &windows_tsan_sources, |
| 108 | else => &unix_tsan_sources, |
| 109 | }; |
| 109 | 110 | try c_source_files.ensureUnusedCapacity(platform_tsan_sources.len); |
| 110 | 111 | for (platform_tsan_sources) |tsan_src| { |
| 111 | 112 | var cflags = std.ArrayList([]const u8).init(arena); |
| ... | ... | @@ -115,7 +116,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 115 | 116 | |
| 116 | 117 | try cflags.append("-nostdinc++"); |
| 117 | 118 | try cflags.append("-fvisibility-inlines-hidden"); |
| 118 | | try cflags.append("-std=c++14"); |
| 119 | try cflags.append("-std=c++17"); |
| 119 | 120 | try cflags.append("-fno-rtti"); |
| 120 | 121 | |
| 121 | 122 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -155,10 +156,12 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 155 | 156 | |
| 156 | 157 | try cflags.append("-I"); |
| 157 | 158 | try cflags.append(sanitizer_common_include_path); |
| 159 | try cflags.append("-I"); |
| 160 | try cflags.append(tsan_include_path); |
| 158 | 161 | |
| 159 | 162 | try cflags.append("-nostdinc++"); |
| 160 | 163 | try cflags.append("-fvisibility-inlines-hidden"); |
| 161 | | try cflags.append("-std=c++14"); |
| 164 | try cflags.append("-std=c++17"); |
| 162 | 165 | try cflags.append("-fno-rtti"); |
| 163 | 166 | |
| 164 | 167 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -180,10 +183,12 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 180 | 183 | |
| 181 | 184 | try cflags.append("-I"); |
| 182 | 185 | try cflags.append(sanitizer_common_include_path); |
| 186 | try cflags.append("-I"); |
| 187 | try cflags.append(tsan_include_path); |
| 183 | 188 | |
| 184 | 189 | try cflags.append("-nostdinc++"); |
| 185 | 190 | try cflags.append("-fvisibility-inlines-hidden"); |
| 186 | | try cflags.append("-std=c++14"); |
| 191 | try cflags.append("-std=c++17"); |
| 187 | 192 | try cflags.append("-fno-rtti"); |
| 188 | 193 | |
| 189 | 194 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -204,7 +209,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 204 | 209 | |
| 205 | 210 | try cflags.append("-nostdinc++"); |
| 206 | 211 | try cflags.append("-fvisibility-inlines-hidden"); |
| 207 | | try cflags.append("-std=c++14"); |
| 212 | try cflags.append("-std=c++17"); |
| 208 | 213 | try cflags.append("-fno-rtti"); |
| 209 | 214 | |
| 210 | 215 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -233,7 +238,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 233 | 238 | |
| 234 | 239 | try cflags.append("-nostdinc++"); |
| 235 | 240 | try cflags.append("-fvisibility-inlines-hidden"); |
| 236 | | try cflags.append("-std=c++14"); |
| 241 | try cflags.append("-std=c++17"); |
| 237 | 242 | try cflags.append("-fno-rtti"); |
| 238 | 243 | |
| 239 | 244 | c_source_files.appendAssumeCapacity(.{ |
| ... | ... | @@ -278,12 +283,12 @@ pub fn buildTsan(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 278 | 283 | } |
| 279 | 284 | |
| 280 | 285 | const tsan_sources = [_][]const u8{ |
| 281 | | "tsan_clock.cpp", |
| 282 | 286 | "tsan_debugging.cpp", |
| 283 | 287 | "tsan_external.cpp", |
| 284 | 288 | "tsan_fd.cpp", |
| 285 | 289 | "tsan_flags.cpp", |
| 286 | 290 | "tsan_ignoreset.cpp", |
| 291 | "tsan_interceptors_memintrinsics.cpp", |
| 287 | 292 | "tsan_interceptors_posix.cpp", |
| 288 | 293 | "tsan_interface.cpp", |
| 289 | 294 | "tsan_interface_ann.cpp", |
| ... | ... | @@ -293,9 +298,12 @@ const tsan_sources = [_][]const u8{ |
| 293 | 298 | "tsan_md5.cpp", |
| 294 | 299 | "tsan_mman.cpp", |
| 295 | 300 | "tsan_mutexset.cpp", |
| 301 | "tsan_new_delete.cpp", |
| 302 | "tsan_platform_windows.cpp", |
| 296 | 303 | "tsan_preinit.cpp", |
| 297 | 304 | "tsan_report.cpp", |
| 298 | 305 | "tsan_rtl.cpp", |
| 306 | "tsan_rtl_access.cpp", |
| 299 | 307 | "tsan_rtl_mutex.cpp", |
| 300 | 308 | "tsan_rtl_proc.cpp", |
| 301 | 309 | "tsan_rtl_report.cpp", |
| ... | ... | @@ -304,6 +312,7 @@ const tsan_sources = [_][]const u8{ |
| 304 | 312 | "tsan_suppressions.cpp", |
| 305 | 313 | "tsan_symbolize.cpp", |
| 306 | 314 | "tsan_sync.cpp", |
| 315 | "tsan_vector_clock.cpp", |
| 307 | 316 | }; |
| 308 | 317 | |
| 309 | 318 | const darwin_tsan_sources = [_][]const u8{ |
| ... | ... | @@ -318,9 +327,17 @@ const unix_tsan_sources = [_][]const u8{ |
| 318 | 327 | "tsan_platform_posix.cpp", |
| 319 | 328 | }; |
| 320 | 329 | |
| 330 | const windows_tsan_sources = [_][]const u8{ |
| 331 | "tsan_platform_windows.cpp", |
| 332 | }; |
| 333 | |
| 321 | 334 | const sanitizer_common_sources = [_][]const u8{ |
| 322 | 335 | "sanitizer_allocator.cpp", |
| 336 | "sanitizer_chained_origin_depot.cpp", |
| 323 | 337 | "sanitizer_common.cpp", |
| 338 | "sanitizer_coverage_win_dll_thunk.cpp", |
| 339 | "sanitizer_coverage_win_dynamic_runtime_thunk.cpp", |
| 340 | "sanitizer_coverage_win_weak_interception.cpp", |
| 324 | 341 | "sanitizer_deadlock_detector1.cpp", |
| 325 | 342 | "sanitizer_deadlock_detector2.cpp", |
| 326 | 343 | "sanitizer_errno.cpp", |
| ... | ... | @@ -335,8 +352,6 @@ const sanitizer_common_sources = [_][]const u8{ |
| 335 | 352 | "sanitizer_mac.cpp", |
| 336 | 353 | "sanitizer_mutex.cpp", |
| 337 | 354 | "sanitizer_netbsd.cpp", |
| 338 | | "sanitizer_openbsd.cpp", |
| 339 | | "sanitizer_persistent_allocator.cpp", |
| 340 | 355 | "sanitizer_platform_limits_freebsd.cpp", |
| 341 | 356 | "sanitizer_platform_limits_linux.cpp", |
| 342 | 357 | "sanitizer_platform_limits_netbsd.cpp", |
| ... | ... | @@ -351,15 +366,22 @@ const sanitizer_common_sources = [_][]const u8{ |
| 351 | 366 | "sanitizer_procmaps_linux.cpp", |
| 352 | 367 | "sanitizer_procmaps_mac.cpp", |
| 353 | 368 | "sanitizer_procmaps_solaris.cpp", |
| 369 | "sanitizer_range.cpp", |
| 354 | 370 | "sanitizer_solaris.cpp", |
| 371 | "sanitizer_stack_store.cpp", |
| 355 | 372 | "sanitizer_stoptheworld_fuchsia.cpp", |
| 356 | 373 | "sanitizer_stoptheworld_mac.cpp", |
| 374 | "sanitizer_stoptheworld_win.cpp", |
| 357 | 375 | "sanitizer_suppressions.cpp", |
| 358 | 376 | "sanitizer_termination.cpp", |
| 377 | "sanitizer_thread_arg_retval.cpp", |
| 359 | 378 | "sanitizer_thread_registry.cpp", |
| 360 | 379 | "sanitizer_tls_get_addr.cpp", |
| 361 | 380 | "sanitizer_type_traits.cpp", |
| 362 | 381 | "sanitizer_win.cpp", |
| 382 | "sanitizer_win_dll_thunk.cpp", |
| 383 | "sanitizer_win_dynamic_runtime_thunk.cpp", |
| 384 | "sanitizer_win_weak_interception.cpp", |
| 363 | 385 | }; |
| 364 | 386 | |
| 365 | 387 | const sanitizer_nolibc_sources = [_][]const u8{ |