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++


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++
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to