[PATCH] D25491: [libcxx] Use C++14 when building libc++ with musl
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 23 14:57:45 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284950: [libcxx] Use C++14 when building libc++ with musl (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D25491?vs=75553&id=75554#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25491
Files:
libcxx/trunk/CMakeLists.txt
Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -325,6 +325,11 @@
# 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})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25491.75554.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161023/f73bec31/attachment.bin>
More information about the cfe-commits
mailing list