llvm.org GIT mirror llvm / f92d91a
Merging r285782: ------------------------------------------------------------------------ r285782 | brad | 2016-11-01 18:39:01 -0700 (Tue, 01 Nov 2016) | 9 lines Disable the use of std::call_once on OpenBSD with libstdc++. It was noticed this caused performance regressions and deadlocks. PR30768. Reorder the code to make it clearer what is tested. PPC now disables the use of std::call_once only with libstdc++ with the reordering of the code, as was the original intent. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288075 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1919 #include // So we can check the C++ standard lib macros.
2020 #include
2121
22 // We use std::call_once on all Unix platforms except for NetBSD with
23 // libstdc++. That platform has a bug they are working to fix, and they'll
24 // remove the NetBSD checks once fixed.
25 #if defined(LLVM_ON_UNIX) && \
26 !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) && !defined(__ppc__)
22 // std::call_once from libc++ is used on all Unix platforms. Other
23 // implementations like libstdc++ are known to have problems on NetBSD,
24 // OpenBSD and PowerPC.
25 #if defined(LLVM_ON_UNIX) && (defined(_LIBCPP_VERSION) || \
26 !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ppc__)))
2727 #define LLVM_THREADING_USE_STD_CALL_ONCE 1
2828 #else
2929 #define LLVM_THREADING_USE_STD_CALL_ONCE 0