aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Threading.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 23:04:38 +0000
commit0e1e0ce556810ad5f9d45485e686f0653530516c (patch)
treeab02ce7c4fafc0518430e9cec77d41201bce23f0 /contrib/llvm-project/llvm/lib/Support/Threading.cpp
parentc3eb0b7c19221f3a2133ab14d3ffffa61ec0c4bc (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Threading.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Threading.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Threading.cpp b/contrib/llvm-project/llvm/lib/Support/Threading.cpp
index f1b79cf4427a..07ada7a75bf2 100644
--- a/contrib/llvm-project/llvm/lib/Support/Threading.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/Threading.cpp
@@ -94,6 +94,11 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const {
// the same interface as std::thread but requests the same stack size as the
// main thread (8MB) before creation.
const std::optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024;
+#elif defined(_AIX)
+ // On AIX, the default pthread stack size limit is ~192k for 64-bit programs.
+ // This limit is easily reached when doing link-time thinLTO. AIX library
+ // developers have used 4MB, so we'll do the same.
+const std::optional<unsigned> llvm::thread::DefaultStackSize = 4 * 1024 * 1024;
#else
const std::optional<unsigned> llvm::thread::DefaultStackSize;
#endif