[PATCH] D18174: Fix libcxx build on musl
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 30 19:59:57 PDT 2017
EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.
This patch is not OK, since it affects way more that just MUSL libc.
Also can you please provide a reduced reproducer as two why `pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER` is not a constant expression with MUSL?
================
Comment at: include/__mutex_base:51
#ifndef _LIBCPP_CXX03_LANG
- constexpr mutex() = default;
+#ifdef __GLIBC__
+ constexpr
----------------
Limiting `constexpr` to GLIBC implementations only is incorrect; you want to exclude MUSL.
Also MUSL is wrong for not allowing `pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER` to be a constant expression, and MUSL should fix that.
https://reviews.llvm.org/D18174
More information about the cfe-commits
mailing list