diff --git a/extra/llvm/build b/extra/llvm/build index 6bee4a51..37acc6bc 100755 --- a/extra/llvm/build +++ b/extra/llvm/build @@ -2,6 +2,8 @@ export DESTDIR="$1" +patch -p1 < musl-stack-size.patch + cd llvm cmake -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ diff --git a/extra/llvm/checksums b/extra/llvm/checksums index f2a3c9af..feacc118 100644 --- a/extra/llvm/checksums +++ b/extra/llvm/checksums @@ -1,2 +1,3 @@ b3f2a3fc4d2f77ef717f920ec5bd224a196e67c024ecf0b1080e38f8b95ba297ed 78c57fd0ae1cf67b61210b2d6be58aa51372161e8de66efa78a268dcdb348520b3 +c975229979af06c139b27c56d42cb32a58b16aa5b0b74e28245a06e75be8f35e1d diff --git a/extra/llvm/patches/musl-stack-size.patch b/extra/llvm/patches/musl-stack-size.patch new file mode 100644 index 00000000..b3f2189d --- /dev/null +++ b/extra/llvm/patches/musl-stack-size.patch @@ -0,0 +1,14 @@ +diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp +index 923935bbc..26594aac8 100644 +--- a/llvm/lib/Support/Threading.cpp ++++ b/llvm/lib/Support/Threading.cpp +@@ -77,7 +77,7 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const { + // keyword. + #include "llvm/Support/thread.h" + +-#if defined(__APPLE__) ++#if 1 + // 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 + diff --git a/extra/llvm/sources b/extra/llvm/sources index 250ae371..426fe7a3 100644 --- a/extra/llvm/sources +++ b/extra/llvm/sources @@ -1,2 +1,3 @@ https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.2/llvm-18.1.2.src.tar.xz llvm https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.2/cmake-18.1.2.src.tar.xz cmake +patches/musl-stack-size.patch