forked from OSchip/llvm-project
Fix chromium build (libcxxabi)
Pull the dependency on pthread_mach_thread_np() back into libcxxabi. llvm-svn: 293166
This commit is contained in:
parent
64bbb1357f
commit
085b612c31
|
@ -179,7 +179,19 @@ _LIBCXXABI_FUNC_VIS int __cxa_guard_acquire(guard_type *guard_object) {
|
|||
if (result)
|
||||
{
|
||||
#if defined(__APPLE__) && !defined(__arm__)
|
||||
const lock_type id = std::__libcpp_thread_get_port();
|
||||
// This is a special-case pthread dependency for Mac. We can't pull this
|
||||
// out into libcxx's threading API (__threading_support) because not all
|
||||
// supported Mac environments provide this function (in pthread.h). To
|
||||
// make it possible to build/use libcxx in those environments, we have to
|
||||
// keep this pthread dependency local to libcxxabi. If there is some
|
||||
// convenient way to detect precisely when pthread_mach_thread_np is
|
||||
// available in a given Mac environment, it might still be possible to
|
||||
// bury this dependency in __threading_support.
|
||||
#ifdef _LIBCPP_HAS_THREAD_API_PTHREAD
|
||||
const lock_type id = pthread_mach_thread_np(std::__libcpp_thread_get_current_id());
|
||||
#else
|
||||
#error "How do I pthread_mach_thread_np()?"
|
||||
#endif
|
||||
lock_type lock = get_lock(*guard_object);
|
||||
if (lock)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue