Author: phosek
Date: Sun Oct 23 16:48:27 2016
New Revision: 284950

URL: http://llvm.org/viewvc/llvm-project?rev=284950&view=rev
Log:
[libcxx] Use C++14 when building libc++ with musl

musl's pthread implementations use volatile types in their structs
which is not being constexpr in C++11 but is in C++14.

Differential Revision: https://reviews.llvm.org/D25491

Modified:
    libcxx/trunk/CMakeLists.txt

Modified: libcxx/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=284950&r1=284949&r2=284950&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Sun Oct 23 16:48:27 2016
@@ -325,6 +325,11 @@ remove_flags(-Wno-pedantic -pedantic-err
 
 # Required flags ==============================================================
 set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build 
dialect")
+if (LIBCXX_HAS_MUSL_LIBC)
+  # 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(LIBCXX_STANDARD_VER c++14 CACHE INTERNAL "internal option to change 
build dialect")
+endif()
 add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
 mangle_name("LIBCXX_SUPPORTS_STD_EQ_${LIBCXX_STANDARD_VER}_FLAG" 
SUPPORTS_DIALECT_NAME)
 if (NOT MSVC AND NOT ${SUPPORTS_DIALECT_NAME})


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to