0001-llvm-always-set-a-larger-stack-size-explicitly.patch (1383B)
1 From 9a866f0faba625016c2ee62d2956ba9a4245cc94 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/28] 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 90352d2f21..59e6705f9b 100644 12 --- a/llvm/lib/Support/Threading.cpp 13 +++ b/llvm/lib/Support/Threading.cpp 14 @@ -78,20 +78,7 @@ 15 return std::min((unsigned)MaxThreadCount, ThreadsRequested); 16 } 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 2.52.0