Bug 313560
| Summary: | [CMake] Set --std=c++17 for the libatomic probe | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zak ridouh <zakr> |
| Component: | CMake | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aperez, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
zak ridouh
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175777090>
zak ridouh
Pull request: https://github.com/WebKit/WebKit/pull/63816
EWS
Committed 312222@main (cfb69a99823a): <https://commits.webkit.org/312222@main>
Reviewed commits have been landed. Closing PR #63816 and removing active labels.
Adrian Perez
Reopening for a follow-up.
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/63832
EWS
Committed 312266@main (07ed81f30130): <https://commits.webkit.org/312266@main>
Reviewed commits have been landed. Closing PR #63832 and removing active labels.
EWS
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.