AtomicSharedPtr-detail.h does not work with libc++ (#900)
Summary: Problem: - There are several tests enabled which rely on using shared_ptr_internals found in folly/concurrency/detail/AtomicSharedPtr-detail.h and the implementation only works for libstdc++ and not with other vendors such as libc++ and libcpp. - This results in a hard error when compiling with Clang with libc++. Solution: - Add a CMake configure check to detect whether one is using libstdc++. FOLLY_USE_LIBSTDCPP macro is set to 1 if using libstdc++, 0 otherwise. - Use FOLLY_USE_LIBSTDCPP to conditionally run the tests relying on shared_ptr_internals only when using libstdc++. Note: - A longer-term solution would be to implement the similar shared_ptr_internals with the libc++ types and provide a fallback locking approach for libcpp (MSVC standard library implementation). Pull Request resolved: https://github.com/facebook/folly/pull/900 Reviewed By: djwatson Differential Revision: D9312236 Pulled By: yfeldblum fbshipit-source-id: 657eddc1e530b00bd5f5b10e7155bc3b6aac3726
Showing
Please register or sign in to comment