-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: lake: computation of precompiled libs (#4566)
Addresses a few issues with precompile library computation. * Fixes a bug where Lake would always precompile the package of a module. * If a module is precompiled, it now precompiles its imports. Previously, it would only do this if imported. Closes #4565.
- Loading branch information
Showing
5 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
set -ex | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
LAKE=${LAKE:-../../.lake/build/bin/lake} | ||
|
||
./clean.sh | ||
./package.sh | ||
|
||
# Tests that a non-precmpiled build does not load anything as a dynlib | ||
# https://github.com/leanprover/lean4/issues/4565 | ||
$LAKE -d app build -v | (grep --color load-dynlib && exit 1 || true) | ||
$LAKE -d lib build -v | (grep --color load-dynlib && exit 1 || true) | ||
|
||
./app/.lake/build/bin/app | ||
./lib/.lake/build/bin/test | ||
|
||
${LAKE:-../../.lake/build/bin/lake} -d app build -v Test | ||
# Tests the successful precompilation of an `extern_lib` | ||
# Also tests a module with `precompileModules` always precompiles its imports | ||
$LAKE -d app build Test |