fix: use response files on all platforms to avoid ARG_MAX#12540
Open
kim-em wants to merge 1 commit intoleanprover:masterfrom
Open
fix: use response files on all platforms to avoid ARG_MAX#12540kim-em wants to merge 1 commit intoleanprover:masterfrom
kim-em wants to merge 1 commit intoleanprover:masterfrom
Conversation
urkud
reviewed
Feb 18, 2026
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
Lake already uses response files (`@file`) on Windows to avoid exceeding CLI length limits. This extends that behavior to macOS and Linux, where linking Mathlib's ~15,000 object files into a shared library exceeds 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. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0757230 to
3823d9a
Compare
Collaborator
Author
|
@tydeu, can I merge this? It is solving a reported user problem. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends Lake's use of response files (
@file) from Windows-only to all platforms, avoidingARG_MAXlimits when invokingclang/arwith 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). Bothclangandgccsupport@fileresponse 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
.soshared libs but not macOS.dylibfiles, soprecompileModuleson macOS triggers a full re-link that exceedsARG_MAX.🤖 Prepared with Claude Code