aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm14/llvm-stack-size.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/llvm14/llvm-stack-size.patch')
-rw-r--r--main/llvm14/llvm-stack-size.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/llvm14/llvm-stack-size.patch b/main/llvm14/llvm-stack-size.patch
new file mode 100644
index 00000000000..68f402f826b
--- /dev/null
+++ b/main/llvm14/llvm-stack-size.patch
@@ -0,0 +1,34 @@
+Patch-Source: https://github.com/chimera-linux/cports/blob/8c0359f31b9d888e59ced0320e93ca8ad79ba1f9/main/llvm/patches/0010-always-set-a-larger-stack-size-explicitly.patch
+From 18e09846d9333b554e3dfbbd768ada6643bf92c0 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 27 Nov 2021 01:03:28 +0100
+Subject: [PATCH 10/22] always set a larger stack size explicitly
+
+---
+ llvm/lib/Support/Threading.cpp | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
+index 04a1a9e19..776badaad 100644
+--- a/lib/Support/Threading.cpp
++++ b/lib/Support/Threading.cpp
+@@ -82,16 +82,7 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const {
+ // keyword.
+ #include "llvm/Support/thread.h"
+
+-#if defined(__APPLE__)
+- // Darwin's default stack size for threads except the main one is only 512KB,
+- // which is not enough for some/many normal LLVM compilations. This implements
+- // the same interface as std::thread but requests the same stack size as the
+- // main thread (8MB) before creation.
+ const llvm::Optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024;
+-#else
+-const llvm::Optional<unsigned> llvm::thread::DefaultStackSize = None;
+-#endif
+-
+
+ #endif
+
+--
+2.35.1
+