summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-12-11 20:26:30 -0500
committerEric Fiselier <eric@efcs.ca>2019-12-11 20:26:30 -0500
commit72b41e6e2d560aee6f52b2f1db385972053bc7d1 (patch)
treeb2d81d7cb597ef8b3b8672c0729a944c926aad7e /libcxx
parent9fdcae7c81f5ff92ad694f5d993a042a525fd6bc (diff)
downloadbcm5719-llvm-72b41e6e2d560aee6f52b2f1db385972053bc7d1.tar.gz
bcm5719-llvm-72b41e6e2d560aee6f52b2f1db385972053bc7d1.zip
[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.
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/CMakeLists.txt20
1 files changed, 7 insertions, 13 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index fa488da0885..443097c090e 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.
OpenPOWER on IntegriCloud