Skip to content

Commit

Permalink
Meta: Use -std=c++2b on mac hosts in the GN build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nico committed May 7, 2024
1 parent 70a11a8 commit f2177b7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Meta/gn/build/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 += [
Expand Down

0 comments on commit f2177b7

Please sign in to comment.