[llvm] [Bazel] Give musl LLVM tools 8 MiB worker stacks (PR #223989)

David Zbarsky via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 17:49:44 PDT 2026


dzbarsky wrote:

> The change seems well motivated and reasonable to accept, but I'm not sure this is the right place for it -- I would expect to see changes like this at a more global level, either on an individual cc_binary/cc_test, or provided as extra opts to the build command (e.g. `bazel build --features=thin_lto --linkopts=-Wl,-z,stack-size=xxx`). Is there a reason this change needs to be on the `Support` cc_library target?

Yep the goal was to have it propagate to all the binary targets. While I hit this specifically in the linker, this pass might also run in the compiler, and in general it seems like any arbitrary binary could have recursive functions that use more stack space than musl's default 128KB. These things generally won't get caught by existing in-repo testing since glibc's is often higher.

I suppose one could also argue that it's the responsibility of the toolchain or user to configure this, but I suspect in reality it will just lead to it not being set and having these sorts of issues.

https://github.com/llvm/llvm-project/pull/223989


More information about the llvm-commits mailing list