chore: remove USE_LAKE build option#13855
Draft
Kha wants to merge 6 commits into
Draft
Conversation
`USE_LAKE` defaulted to `ON` and was force-disabled at stage 0, making it exactly equivalent to `STAGE GREATER 0`. Remove the user-facing option and the redundant `set(USE_LAKE OFF)` logic, replacing all guards with direct `STAGE` checks in `CMakeLists.txt` and `stdlib.make.in`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Now that `-DUSE_LAKE=OFF` is gone, `stdlib.make`'s `leanmake` branch and `lean.mk` only ever run at stage 0 with `C_ONLY=1`. Remove the now-unreachable code: fold `C_ONLY` into `LEANMAKE_OPTS`, drop the dead `EXTRA_SRC_ROOTS` and `STAGE` conditionals in `stdlib.make`, and strip the `.lean`/LLVM/`bin` paths from `lean.mk`, leaving only stage-0 C compilation and archiving. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `leanmake`/`lean.mk` makefile is now only reached by the stage-0 build, so fold its C-compilation and archiving rules directly into `stdlib.make` and delete `lean.mk.in` and the `leanmake` wrapper. Built-in make rules are disabled and the object files marked `.PRECIOUS` so the inlined pattern rules behave as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`leanmake` was removed when `lean.mk` was inlined into `stdlib.make`. Delete the `doc/examples/compiler` example and its test, which built a binary via `leanmake`, and drop the stale `leanmake`/`lean.mk` references from the developer docs and the webserver playground README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The stage-0 build compiled every source twice on Windows (with and without `-DLEAN_EXPORTING`) and produced both `lib*.a` and `lib*.a.export` archives, mirroring a distinction only the shared-library and toolchain link steps need. Stage 0 links nothing that requires the non-exported variant, so compile each source once with `-DLEAN_EXPORTING` and produce a single archive per package. The `libleanshared` recipe now references the `.a.export` archives by path, consistent with the rest of the makefile. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Propagate the build-system changes from the preceding commits — the inlined `stdlib.make.in`, the updated `CMakeLists.txt` / `stdlib_flags.h`, and the removal of `lean.mk.in` and `bin/leanmake` — into `stage0/src/`. No `.lean` source changed, so `stage0/stdlib/` is unaffected. Verified by clean-building stage 0 from the snapshot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Reference manual CI status:
|
|
Mathlib CI status (docs):
|
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.
and clean up