Skip to content

Commit

Permalink
Fix compiling with libc++ but not linking with libc++.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchisnall committed Sep 5, 2020
1 parent 365e536 commit 4180811
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arc.mm
Expand Up @@ -110,6 +110,18 @@ - (void)release;
return static_cast<T*>(calloc(sizeof(T), 1));
}

#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_NAMESPACE_STD
/**
* If we're compiling with libc++, we need to instantiate the vector base class
* to avoid linker errors. Libc++ defines the functions that throw exceptions
* in the headers but makes them extern templates to avoid code duplication in
* the slow paths.
*/
template class __attribute__((visibility("hidden"))) __vector_base_common<true>;
_LIBCPP_END_NAMESPACE_STD
#endif


static inline struct arc_tls* getARCThreadData(void)
{
Expand Down

0 comments on commit 4180811

Please sign in to comment.