RESOLVED FIXED313560
[CMake] Set --std=c++17 for the libatomic probe
https://bugs.webkit.org/show_bug.cgi?id=313560
Summary [CMake] Set --std=c++17 for the libatomic probe
zak ridouh
Reported 2026-04-28 11:37:45 PDT
The atomic source test uses std::atomic<std::optional<double>>, which requires C++17. check_cxx_source_compiles inherits the compiler's default C++ standard, and on compilers that default to C++14 or earlier the probe fails with "no member named 'optional' in namespace 'std'". Pre-312202@main this was silent and the build proceeded (builtins suffice on arm64 without libatomic). 312202@main promoted the failure to FATAL_ERROR, which broke the CMake build on those compilers. Set CMAKE_REQUIRED_FLAGS to --std=c++2b around the probe, mirroring the existing pattern at the std::filesystem detection a few lines below. unset() restores the previous state.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-28 11:37:52 PDT
zak ridouh
Comment 2 2026-04-28 11:47:10 PDT
EWS
Comment 3 2026-04-28 13:11:58 PDT
Committed 312222@main (cfb69a99823a): <https://commits.webkit.org/312222@main> Reviewed commits have been landed. Closing PR #63816 and removing active labels.
Adrian Perez
Comment 4 2026-04-28 14:22:48 PDT
Reopening for a follow-up.
Adrian Perez
Comment 5 2026-04-28 14:32:01 PDT
EWS
Comment 6 2026-04-29 00:09:47 PDT
Committed 312266@main (07ed81f30130): <https://commits.webkit.org/312266@main> Reviewed commits have been landed. Closing PR #63832 and removing active labels.
EWS
Comment 7 2026-04-29 01:41:21 PDT
Committed 305877.462@webkitglib/2.52 (b7eabfc1efa4): <https://commits.webkit.org/305877.462@webkitglib/2.52> Reviewed commits have been landed. Closing PR #63872 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.