Skip to content

Commit

Permalink
[libc++] [libc++abi] Use C++20 standard.
Browse files Browse the repository at this point in the history
This change is needed to use char8_t when building libc++.
Using the same standard in libc++abi for coherence.

See https://reviews.llvm.org/D91517.

Reviewed By: ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D91691
  • Loading branch information
mkurdej committed Nov 22, 2020
1 parent 29dffb0 commit 3b62506
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions libcxx/CMakeLists.txt
Expand Up @@ -514,11 +514,11 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
function(cxx_add_basic_build_flags target)

# Require C++17 for all targets. C++17 is needed to use aligned allocation
# in the dylib.
# Require C++20 for all targets. C++17 is needed to use aligned allocation
# in the dylib. C++20 is needed to use char8_t.
set_target_properties(${target} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED YES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED NO
CXX_EXTENSIONS NO)

# When building the dylib, don't warn for unavailable aligned allocation
Expand Down
8 changes: 4 additions & 4 deletions libcxxabi/src/CMakeLists.txt
Expand Up @@ -174,9 +174,9 @@ if (LIBCXXABI_ENABLE_SHARED)
CXX_EXTENSIONS
OFF
CXX_STANDARD
17
20
CXX_STANDARD_REQUIRED
ON
OFF
COMPILE_FLAGS
"${LIBCXXABI_COMPILE_FLAGS}"
LINK_FLAGS
Expand Down Expand Up @@ -241,9 +241,9 @@ if (LIBCXXABI_ENABLE_STATIC)
CXX_EXTENSIONS
OFF
CXX_STANDARD
17
20
CXX_STANDARD_REQUIRED
ON
OFF
COMPILE_FLAGS
"${LIBCXXABI_COMPILE_FLAGS}"
LINK_FLAGS
Expand Down

0 comments on commit 3b62506

Please sign in to comment.