[PATCH] D25491: [libcxx] Use C++14 when building libc++ with musl
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 11 15:40:54 PDT 2016
phosek created this revision.
phosek added reviewers: EricWF, mclow.lists.
phosek added a subscriber: cfe-commits.
phosek set the repository for this revision to rL LLVM.
Herald added subscribers: mgorny, beanz.
musl's pthread implementations use volatile types in their structs which is not being constexpr in C++11 but is in C++14.
Repository:
rL LLVM
https://reviews.llvm.org/D25491
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -331,6 +331,11 @@
message(FATAL_ERROR "C++11 or greater is required but the compiler does not support ${LIBCXX_STANDARD_VER}")
endif()
+check_flag_supported(-std=c++14)
+if (LIBCXX_HAS_MUSL_LIBC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG)
+ string(REPLACE "-std=c++11" "-std=c++14" LIBCXX_COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}")
+endif()
+
# 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.
# Thus, we do nothing and hope we don't accidentally include any of the C++
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25491.74305.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161011/7570f730/attachment-0001.bin>
More information about the cfe-commits
mailing list