Skip to content

chore: lake: backport dynlib fixes#8187

Merged
tydeu merged 6 commits intoleanprover:releases/v4.19.0from
tydeu:lake/backport-dynlib-fixes
May 1, 2025
Merged

chore: lake: backport dynlib fixes#8187
tydeu merged 6 commits intoleanprover:releases/v4.19.0from
tydeu:lake/backport-dynlib-fixes

Conversation

@tydeu
Copy link
Copy Markdown
Member

@tydeu tydeu commented Apr 30, 2025

This PR backports fixes to dynamic library linking and loading in Lake to v4.19.0.

Includes changes from #7809, #8026, #8152, and #8190.

tydeu and others added 4 commits April 30, 2025 19:31
This PR fixes the order of libraries when loading them via
`--load-dynlib` or `--plugin` in `lean` and when linking them into a
shared library or executable. A `Dynlib` now tracks its dependencies and
they are topologically sorted before being passed to either linking or
loading.

Closes leanprover#7790.
…nprover#8152)

This PR fixes a regression where non-precompiled module builds would
`--load-dynlib` package `extern_lib` targets.

A reappearance of leanprover#4565. Thanks to Daniil [on
Zulip](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Multiple.20extern_lib/near/514772675)
for the report! This was not caught by the old test due to the removal
of `extern_lib` from the FFI example.
@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 Apr 30, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Apr 30, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 30, 2025
@ghost ghost added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Apr 30, 2025
@ghost
Copy link
Copy Markdown

ghost commented Apr 30, 2025

Mathlib CI status (docs):

ghost pushed a commit to leanprover-community/batteries that referenced this pull request May 1, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 1, 2025
tydeu and others added 2 commits May 1, 2025 04:48
…er#8190)

This PR adds documentation for native library options (e.g., `dynlibs`,
`plugins`, `moreLinkObjs`, `moreLinkLibs`) and `needs` to the Lake
README. It is also includes information about specifying targets on the
Lake CLI and in Lean and TOML configuration files.
@tydeu tydeu force-pushed the lake/backport-dynlib-fixes branch from c891a17 to f424d70 Compare May 1, 2025 02:51
@tydeu tydeu marked this pull request as ready for review May 1, 2025 03:02
@tydeu tydeu merged commit 6caaee8 into leanprover:releases/v4.19.0 May 1, 2025
15 checks passed
@tydeu tydeu deleted the lake/backport-dynlib-fixes branch May 1, 2025 03:13
ghost pushed a commit to leanprover-community/batteries that referenced this pull request May 1, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan 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.

1 participant