Skip to content

chore: remove USE_LAKE build option#13855

Draft
Kha wants to merge 6 commits into
leanprover:masterfrom
Kha:push-mpqpzzqouqpn
Draft

chore: remove USE_LAKE build option#13855
Kha wants to merge 6 commits into
leanprover:masterfrom
Kha:push-mpqpzzqouqpn

Conversation

@Kha
Copy link
Copy Markdown
Member

@Kha Kha commented May 26, 2026

and clean up

Kha and others added 6 commits May 21, 2026 09:19
`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>
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 26, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-05-20 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-05-26 16:47:53)

@github-actions github-actions Bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label May 26, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label May 26, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants