[libcxx-commits] [libcxx] 72b41e6 - [libc++] Require C++14 in all cases.
Eric Fiselier via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 11 17:28:46 PST 2019
Author: Eric Fiselier
Date: 2019-12-11T20:26:30-05:00
New Revision: 72b41e6e2d560aee6f52b2f1db385972053bc7d1
URL: https://github.com/llvm/llvm-project/commit/72b41e6e2d560aee6f52b2f1db385972053bc7d1
DIFF: https://github.com/llvm/llvm-project/commit/72b41e6e2d560aee6f52b2f1db385972053bc7d1.diff
LOG: [libc++] Require C++14 in all cases.
LLVM has moved to C++14, and the libc++ build should too.
C++14 is needed to provide constant initialization for certain global
objects.
I suspect this change may break some older GCC buildbots, and I'll clean
those up as they fall.
Added:
Modified:
libcxx/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index fa488da0885f..443097c090e6 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -518,19 +518,13 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
function(cxx_add_basic_build_flags target)
- if(LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL)
- # musl's pthread implementations uses volatile types in their structs which
- # is not a constexpr in C++11 but is in C++14, so we use C++14 with musl.
- set_target_properties(${target} PROPERTIES
- CXX_STANDARD 14
- CXX_STANDARD_REQUIRED YES
- CXX_EXTENSIONS NO)
- else()
- set_target_properties(${target} PROPERTIES
- CXX_STANDARD 11
- CXX_STANDARD_REQUIRED YES
- CXX_EXTENSIONS NO)
- endif()
+
+ # Require C++14 for all targets. C++14 is needed to ensure constant
+ # initialization for certain globals (ex global memory resources).
+ set_target_properties(${target} PROPERTIES
+ CXX_STANDARD 14
+ CXX_STANDARD_REQUIRED YES
+ CXX_EXTENSIONS NO)
# On all systems the system c++ standard library headers need to be excluded.
# MSVC only has -X, which disables all default includes; including the crt.
More information about the libcxx-commits
mailing list