Meta: Use -std=c++2b on mac hosts in the GN build

Xcode clang doesn't understand the -std=c++23 spelling yet, and this
is what CMake's `set(CMAKE_CXX_STANDARD 23)` translates to too.

Unbreaks building with Xcode clang on macOS.
This commit is contained in:
Nico Weber 2024-05-07 07:45:07 -04:00 committed by Tim Flynn
parent 2f81a3610d
commit 3435770c23

View file

@ -89,10 +89,15 @@ config("compiler_defaults") {
if (use_lld) {
ldflags += [ "-Wl,--color-diagnostics" ]
}
cflags_cc += [
"-std=c++23",
"-fvisibility-inlines-hidden",
]
if (current_os == "mac") {
# FIXME: Use -std=c++23 once Xcode's clang supports that.
cflags_cc += [ "-std=c++2b" ]
} else {
cflags_cc += [ "-std=c++23" ]
}
cflags_cc += [ "-fvisibility-inlines-hidden" ]
# Warning setup.
cflags += [