| ... | ... | @@ -237,19 +237,18 @@ pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError! |
| 237 | 237 | try cflags.append("-DNDEBUG"); |
| 238 | 238 | try cflags.append(hardeningModeFlag(optimize_mode)); |
| 239 | 239 | try cflags.append("-D_LIBCPP_BUILDING_LIBRARY"); |
| 240 | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 240 | 241 | try cflags.append("-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER"); |
| 242 | try cflags.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); |
| 241 | 243 | try cflags.append("-DLIBCXX_BUILDING_LIBCXXABI"); |
| 242 | 244 | try cflags.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 243 | | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 244 | | try cflags.append("-D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS"); |
| 245 | | try cflags.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); |
| 246 | 245 | |
| 247 | 246 | // See libcxx/include/__algorithm/pstl_backends/cpu_backends/backend.h |
| 248 | 247 | // for potentially enabling some fancy features here, which would |
| 249 | 248 | // require corresponding changes in libcxx.zig, as well as |
| 250 | 249 | // Compilation.addCCArgs. This option makes it use serial backend which |
| 251 | 250 | // is simple and works everywhere. |
| 252 | | try cflags.append("-D_LIBCPP_PSTL_CPU_BACKEND_SERIAL"); |
| 251 | try cflags.append("-D_LIBCPP_PSTL_BACKEND_SERIAL"); |
| 253 | 252 | |
| 254 | 253 | try cflags.append(abi_version_arg); |
| 255 | 254 | try cflags.append(abi_namespace_arg); |
| ... | ... | @@ -283,8 +282,10 @@ pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError! |
| 283 | 282 | try cflags.append("-fPIC"); |
| 284 | 283 | } |
| 285 | 284 | try cflags.append("-nostdinc++"); |
| 286 | | try cflags.append("-std=c++20"); |
| 285 | try cflags.append("-std=c++23"); |
| 287 | 286 | try cflags.append("-Wno-user-defined-literals"); |
| 287 | try cflags.append("-Wno-covered-switch-default"); |
| 288 | try cflags.append("-Wno-suggest-override"); |
| 288 | 289 | |
| 289 | 290 | // These depend on only the zig lib directory file path, which is |
| 290 | 291 | // purposefully either in the cache or not in the cache. The decision |
| ... | ... | @@ -476,19 +477,17 @@ pub fn buildLibCXXABI(comp: *Compilation, prog_node: std.Progress.Node) BuildErr |
| 476 | 477 | continue; |
| 477 | 478 | } |
| 478 | 479 | try cflags.append("-D_LIBCXXABI_HAS_NO_THREADS"); |
| 479 | | try cflags.append("-D_LIBCPP_HAS_NO_THREADS"); |
| 480 | 480 | } else if (target.abi.isGnu()) { |
| 481 | 481 | if (target.os.tag != .linux or !(target.os.version_range.linux.glibc.order(.{ .major = 2, .minor = 18, .patch = 0 }) == .lt)) |
| 482 | 482 | try cflags.append("-DHAVE___CXA_THREAD_ATEXIT_IMPL"); |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | | try cflags.append("-D_LIBCPP_DISABLE_EXTERN_TEMPLATE"); |
| 486 | | try cflags.append("-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS"); |
| 485 | try cflags.append("-DNDEBUG"); |
| 486 | try cflags.append(hardeningModeFlag(optimize_mode)); |
| 487 | 487 | try cflags.append("-D_LIBCXXABI_BUILDING_LIBRARY"); |
| 488 | 488 | try cflags.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 489 | 489 | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 490 | | // This must be coordinated with the same flag in libcxx |
| 491 | | try cflags.append("-D_LIBCPP_PSTL_CPU_BACKEND_SERIAL"); |
| 490 | try cflags.append("-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS"); |
| 492 | 491 | |
| 493 | 492 | try cflags.append(abi_version_arg); |
| 494 | 493 | try cflags.append(abi_namespace_arg); |
| ... | ... | @@ -507,14 +506,15 @@ pub fn buildLibCXXABI(comp: *Compilation, prog_node: std.Progress.Node) BuildErr |
| 507 | 506 | } |
| 508 | 507 | } |
| 509 | 508 | |
| 510 | | try cflags.append(hardeningModeFlag(optimize_mode)); |
| 511 | | |
| 512 | 509 | if (target_util.supports_fpic(target)) { |
| 513 | 510 | try cflags.append("-fPIC"); |
| 514 | 511 | } |
| 515 | 512 | try cflags.append("-nostdinc++"); |
| 516 | 513 | try cflags.append("-fstrict-aliasing"); |
| 517 | | try cflags.append("-std=c++20"); |
| 514 | try cflags.append("-std=c++23"); |
| 515 | try cflags.append("-Wno-user-defined-literals"); |
| 516 | try cflags.append("-Wno-covered-switch-default"); |
| 517 | try cflags.append("-Wno-suggest-override"); |
| 518 | 518 | |
| 519 | 519 | // These depend on only the zig lib directory file path, which is |
| 520 | 520 | // purposefully either in the cache or not in the cache. The decision |