[PATCH] Disable use of std::call_once on OpenBSD with libstdc++
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 15 13:46:19 PDT 2016
Disable the use of std::call_once on OpenBSD with libstc++. It was noticed this caused
performance regressions and deadlocks.
https://github.com/rust-lang/rust/issues/36905
-------------- next part --------------
Index: include/llvm/Support/Threading.h
===================================================================
--- include/llvm/Support/Threading.h (revision 284299)
+++ include/llvm/Support/Threading.h (working copy)
@@ -20,11 +20,13 @@
#include <ciso646> // So we can check the C++ standard lib macros.
#include <functional>
-// We use std::call_once on all Unix platforms except for NetBSD with
-// libstdc++. That platform has a bug they are working to fix, and they'll
-// remove the NetBSD checks once fixed.
+// We use std::call_once on all Unix platforms except for NetBSD / OpenBSD with
+// libstdc++. Those platforms have bugs they are working to fix, and they will
+// remove the checks once fixed.
#if defined(LLVM_ON_UNIX) && \
- !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) && !defined(__ppc__)
+ !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) && \
+ !(defined(__OpenBSD__) && !defined(_LIBCPP_VERSION)) && \
+ !defined(__ppc__)
#define LLVM_THREADING_USE_STD_CALL_ONCE 1
#else
#define LLVM_THREADING_USE_STD_CALL_ONCE 0
More information about the llvm-commits
mailing list