mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 10:24:07 +00:00
e96b0ff39c153c305d7aa6613314f7ad7b382ddb
This PR extends Lake's use of response files (`@file`) from Windows-only to all platforms, avoiding `ARG_MAX` limits when invoking `clang`/`ar` with many object files. Lake already uses response files on Windows to avoid exceeding CLI length limits. On macOS and Linux, linking Mathlib's ~15,000 object files into a shared library can exceed macOS's `ARG_MAX` (262,144 bytes). Both `clang` and `gcc` support `@file` response files on all platforms, so this is safe to enable unconditionally. Reported as a macOS issue at https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/The.20clang.20command.20line.20with.20all.20~15.2C000.20Mathlib.20.2Ec.2Eo.2Eexport/near/574369912: the Mathlib cache ships Linux `.so` shared libs but not macOS `.dylib` files, so `precompileModules` on macOS triggers a full re-link that exceeds `ARG_MAX`. 🤖 Prepared with Claude Code Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.
Languages
Lean
94.3%
C++
4.1%
Python
0.6%
Shell
0.4%
CMake
0.3%