musllvm/patches/llvm/0001-llvm-always-set-a-larger-stack-size-explicitly.patch
cowmonk 6110995cfb Initial stub of a Makefile and patches for LLVM
Nothing much, but getting some patches from chimera linux that should
work.
2025-10-25 16:23:17 -07:00

38 lines
1.4 KiB
Diff

From cea7072189cb3a3743bcb8f032c6f6b70e90fe80 Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Sat, 4 Nov 2023 08:44:01 +0100
Subject: [PATCH 01/29] llvm: always set a larger stack size explicitly
---
llvm/lib/Support/Threading.cpp | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
index 693de0e64..dd3e76fb8 100644
--- a/llvm/lib/Support/Threading.cpp
+++ b/llvm/lib/Support/Threading.cpp
@@ -75,21 +75,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 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
-
#endif
--
2.49.0