0001-llvm-always-set-a-larger-stack-size-explicitly.patch (1430B)
1 From cea7072189cb3a3743bcb8f032c6f6b70e90fe80 Mon Sep 17 00:00:00 2001 2 From: q66 <q66@chimera-linux.org> 3 Date: Sat, 4 Nov 2023 08:44:01 +0100 4 Subject: [PATCH 01/29] llvm: always set a larger stack size explicitly 5 6 --- 7 llvm/lib/Support/Threading.cpp | 14 -------------- 8 1 file changed, 14 deletions(-) 9 10 diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp 11 index 693de0e64..dd3e76fb8 100644 12 --- a/llvm/lib/Support/Threading.cpp 13 +++ b/llvm/lib/Support/Threading.cpp 14 @@ -75,21 +75,7 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const { 15 // keyword. 16 #include "llvm/Support/thread.h" 17 18 -#if defined(__APPLE__) 19 - // Darwin's default stack size for threads except the main one is only 512KB, 20 - // which is not enough for some/many normal LLVM compilations. This implements 21 - // the same interface as std::thread but requests the same stack size as the 22 - // main thread (8MB) before creation. 23 const std::optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024; 24 -#elif defined(_AIX) 25 - // On AIX, the default pthread stack size limit is ~192k for 64-bit programs. 26 - // This limit is easily reached when doing link-time thinLTO. AIX library 27 - // developers have used 4MB, so we'll do the same. 28 -const std::optional<unsigned> llvm::thread::DefaultStackSize = 4 * 1024 * 1024; 29 -#else 30 -const std::optional<unsigned> llvm::thread::DefaultStackSize; 31 -#endif 32 - 33 34 #endif 35 36 -- 37 2.49.0 38