chore: use the lean-llvm LLVM for benchmarking (#13634)
This PR makes radar use the LLVM that we actually ship to users (stored at https://github.com/leanprover/lean-llvm). In doing so it also makes the lake build compatible with lean-llvm, allowing us to do potential release builds with lake in the future.
This commit is contained in:
parent
e47636cdca
commit
aa6fa1cf1a
5 changed files with 45 additions and 5 deletions
|
|
@ -52,7 +52,8 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Emscripten")
|
||||||
# Use same platform flags as for Lean executables, in particular from `prepare-llvm-linux.sh`,
|
# Use same platform flags as for Lean executables, in particular from `prepare-llvm-linux.sh`,
|
||||||
# but not Lean-specific `LEAN_EXTRA_CXX_FLAGS` such as fsanitize.
|
# but not Lean-specific `LEAN_EXTRA_CXX_FLAGS` such as fsanitize.
|
||||||
set(CADICAL_CXXFLAGS "${CMAKE_CXX_FLAGS}")
|
set(CADICAL_CXXFLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
set(CADICAL_LDFLAGS "-Wl,-rpath=\\$$ORIGIN/../lib")
|
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}/stage1" CADICAL_INTERNAL_LINKER_FLAGS "${LEANC_INTERNAL_LINKER_FLAGS}")
|
||||||
|
set(CADICAL_LDFLAGS "${CADICAL_INTERNAL_LINKER_FLAGS} -Wl,-rpath=\\$$ORIGIN/../lib")
|
||||||
endif()
|
endif()
|
||||||
find_program(CCACHE ccache)
|
find_program(CCACHE ccache)
|
||||||
if(CCACHE)
|
if(CCACHE)
|
||||||
|
|
|
||||||
|
|
@ -1075,6 +1075,7 @@ string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_INTERNAL_FLAGS "${LEANC_INTERN
|
||||||
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_INTERNAL_LINKER_FLAGS "${LEANC_INTERNAL_LINKER_FLAGS}")
|
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_INTERNAL_LINKER_FLAGS "${LEANC_INTERNAL_LINKER_FLAGS}")
|
||||||
|
|
||||||
toml_escape("${LEAN_EXTRA_OPTS}" LEAN_EXTRA_OPTS_TOML)
|
toml_escape("${LEAN_EXTRA_OPTS}" LEAN_EXTRA_OPTS_TOML)
|
||||||
|
toml_escape("${LEANC_INTERNAL_FLAGS} ${LEANC_INTERNAL_LINKER_FLAGS}" LEAN_MORE_LEANC_ARGS_TOML)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "Debug|Release|RelWithDebInfo|MinSizeRel")
|
if(CMAKE_BUILD_TYPE MATCHES "Debug|Release|RelWithDebInfo|MinSizeRel")
|
||||||
set(CMAKE_BUILD_TYPE_TOML "${CMAKE_BUILD_TYPE}")
|
set(CMAKE_BUILD_TYPE_TOML "${CMAKE_BUILD_TYPE}")
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ moreLeanArgs = [${LEAN_EXTRA_OPTS_TOML}]
|
||||||
# Uncomment to limit number of reported errors further in case of overwhelming cmdline output
|
# Uncomment to limit number of reported errors further in case of overwhelming cmdline output
|
||||||
#weakLeanArgs = ["-DmaxErrors=1"]
|
#weakLeanArgs = ["-DmaxErrors=1"]
|
||||||
|
|
||||||
|
moreLeancArgs = [${LEAN_MORE_LEANC_ARGS_TOML}]
|
||||||
|
|
||||||
${LEAN_EXTRA_LAKEFILE_TOML}
|
${LEAN_EXTRA_LAKEFILE_TOML}
|
||||||
|
|
||||||
[[lean_lib]]
|
[[lean_lib]]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,28 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env nix
|
||||||
|
#! nix develop ..#oldGlibc --command /usr/bin/env bash
|
||||||
|
|
||||||
# This script must be called from the repo root.
|
# This script must be called from the repo root.
|
||||||
# The radar environment variables must be provided.
|
# The radar environment variables must be provided.
|
||||||
# See also the https://github.com/leanprover/radar readme.
|
# See also the https://github.com/leanprover/radar readme.
|
||||||
|
|
||||||
cmake --preset release -DWFAIL=OFF
|
LLVM_RELEASE=19.1.2
|
||||||
|
LLVM_TARBALL="$RADAR_CACHE/llvm/$LLVM_RELEASE.tar.zst"
|
||||||
|
|
||||||
|
if [ ! -f "$LLVM_TARBALL" ]; then
|
||||||
|
mkdir -p "$RADAR_CACHE/llvm"
|
||||||
|
curl --location -o "$LLVM_TARBALL" "https://github.com/leanprover/lean-llvm/releases/download/$LLVM_RELEASE/lean-llvm-x86_64-linux-gnu.tar.zst"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p build/release
|
||||||
|
cd build/release
|
||||||
|
eval cmake ../.. \
|
||||||
|
--preset release $(../../script/prepare-llvm-linux.sh $LLVM_TARBALL) \
|
||||||
|
-DWFAIL=OFF
|
||||||
|
rm -rf stage2
|
||||||
|
cp -r stage1 stage2
|
||||||
|
rm -rf stage3
|
||||||
|
cp -r stage1 stage3
|
||||||
|
cd ../..
|
||||||
make -C build/release -j"$(nproc)" bench-part1
|
make -C build/release -j"$(nproc)" bench-part1
|
||||||
mv tests/part1.measurements.jsonl "$RADAR_OUT"
|
mv tests/part1.measurements.jsonl "$RADAR_OUT"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,27 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env nix
|
||||||
|
#! nix develop ..#oldGlibc --command /usr/bin/env bash
|
||||||
|
|
||||||
# This script must be called from the repo root.
|
# This script must be called from the repo root.
|
||||||
# The radar environment variables must be provided.
|
# The radar environment variables must be provided.
|
||||||
# See also the https://github.com/leanprover/radar readme.
|
# See also the https://github.com/leanprover/radar readme.
|
||||||
|
|
||||||
cmake --preset release -DWFAIL=OFF
|
LLVM_RELEASE=19.1.2
|
||||||
|
LLVM_TARBALL="$RADAR_CACHE/llvm/$LLVM_RELEASE.tar.zst"
|
||||||
|
|
||||||
|
if [ ! -f "$LLVM_TARBALL" ]; then
|
||||||
|
mkdir -p "$RADAR_CACHE/llvm"
|
||||||
|
curl --location -o "$LLVM_TARBALL" "https://github.com/leanprover/lean-llvm/releases/download/$LLVM_RELEASE/lean-llvm-x86_64-linux-gnu.tar.zst"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p build/release
|
||||||
|
cd build/release
|
||||||
|
eval cmake ../.. \
|
||||||
|
--preset release $(../../script/prepare-llvm-linux.sh $LLVM_TARBALL) \
|
||||||
|
-DWFAIL=OFF
|
||||||
|
rm -rf stage2
|
||||||
|
cp -r stage1 stage2
|
||||||
|
rm -rf stage3
|
||||||
|
cp -r stage1 stage3
|
||||||
|
cd ../..
|
||||||
make -C build/release -j"$(nproc)" bench-part2
|
make -C build/release -j"$(nproc)" bench-part2
|
||||||
mv tests/part2.measurements.jsonl "$RADAR_OUT"
|
mv tests/part2.measurements.jsonl "$RADAR_OUT"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue