From f22e6f75ebd88024c17ba79457c13e98a17c00b3 Mon Sep 17 00:00:00 2001 From: Michael Platings Date: Thu, 25 Apr 2019 09:27:50 +0000 Subject: Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error is: libcxxabi/src/cxa_guard_impl.h: In instantiation of ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’: libcxxabi/src/cxa_guard_impl.h:529:62: required from here libcxxabi/src/cxa_guard_impl.h:510:23: error: ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’ has incomplete type _LIBCPP_SAFE_STATIC T GlobalStatic::instance = {}; ^ git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@359175 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit f98261d3290e2b05e7714ba125d9315d87e9d62e) Bug: http://b/189279320 Test: treehugger Change-Id: Idf967a477590de8baf88541aff3aff08ff15e187 --- src/cxa_guard_impl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cxa_guard_impl.h b/src/cxa_guard_impl.h index ea82d20..412099e 100644 --- a/src/cxa_guard_impl.h +++ b/src/cxa_guard_impl.h @@ -257,6 +257,9 @@ struct LibcppCondVar { private: std::__libcpp_condvar_t cond = _LIBCPP_CONDVAR_INITIALIZER; }; +#else +struct LibcppMutex {}; +struct LibcppCondVar {}; #endif // !defined(_LIBCXXABI_HAS_NO_THREADS) -- cgit v1.2.3