[PATCH] D25491: [libcxx] Use C++14 when building libc++ with musl
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 11 19:20:23 PDT 2016
EricWF added a comment.
> musl's pthread implementations use volatile types in their structs which is not being constexpr in C++11 but is in C++14.
This means that libc++'s std::mutex is unsafe to use during dynamic initialization in C++11 with MUSL, which would really suck except that Clang emits always emits the initialization as a constant expression, ever if it's not guaranteed by the core language.
@mclow.lists Do you have any issue bumping the std version while building for MUSL only?
================
Comment at: CMakeLists.txt:327
# Required flags ==============================================================
set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build dialect")
add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
----------------
Why not just set `LIBCXX_STANDARD_VER` differently instead of replacing it after the fact?
Repository:
rL LLVM
https://reviews.llvm.org/D25491
More information about the cfe-commits
mailing list