Skip to content

Commit b4d2a58

Browse files
gebnerCopilot
andcommitted
Fix bump-stage0: exclude karamel from stage0 and fix stage1 exe names
Two issues in the bump-stage0 target: 1. src-install.sh now copies karamel/ into the snapshot, but stage0 doesn't need it. Add rm -rf karamel to the stage0_new trimming. 2. When copying stage2 to stage1, the dune files retain fstarc2_* executable names (both in dune configs and .ml entry points), but the top-level Makefile expects fstarc1_*. This causes the build to fail after bumping. Fix by: - Removing the stale _build directory from the copy - Renaming fstarc2_ to fstarc1_ in the three dune files - Renaming the .ml entry point files to match Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6026339 commit b4d2a58

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ stage0_new: .stage2.src.touch
652652
rm -rf "$(TO)/dune/libplugin" # idem
653653
rm -rf "$(TO)/dune/libapp" # we won't even build apps
654654
rm -rf "$(TO)/dune/tests" # we won't build tests
655+
rm -rf "$(TO)/karamel" # only needed in source packages
655656

656657
bump-stage0: stage0_new
657658
$(call bold_msg, "BUMP!")
@@ -669,6 +670,14 @@ bump-stage0: stage0_new
669670
sed -i 's,include mk/generic-1.mk,include mk/generic-0.mk,' mk/fstar-01.mk
670671
rm -rf stage1
671672
cp -r stage2 stage1
673+
rm -rf stage1/dune/_build
674+
# Rename dune executables: stage1 must use fstarc1_*, not fstarc2_*
675+
sed -i 's/fstarc2_/fstarc1_/g' stage1/dune/fstarc-bare/dune
676+
sed -i 's/fstarc2_/fstarc1_/g' stage1/dune/fstarc-full/dune
677+
sed -i 's/fstarc2_/fstarc1_/g' stage1/dune/tests/dune
678+
mv stage1/dune/fstarc-bare/fstarc2_bare.ml stage1/dune/fstarc-bare/fstarc1_bare.ml
679+
mv stage1/dune/fstarc-full/fstarc2_full.ml stage1/dune/fstarc-full/fstarc1_full.ml
680+
mv stage1/dune/tests/fstarc2_tests.ml stage1/dune/tests/fstarc1_tests.ml
672681
rm -f stage1/dune/fstar-guts/app
673682
ln -Trsf stage0/ulib/ml/app stage1/dune/fstar-guts/app
674683

0 commit comments

Comments
 (0)