Add wlcs compilation script

This commit is contained in:
Ottatop 2024-04-26 13:03:17 -05:00
parent bdcac3b016
commit 612b1ccda0
2 changed files with 19 additions and 0 deletions

4
.gitignore vendored
View file

@ -9,5 +9,9 @@ target/
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Don't push local doc builds
api/lua/doc/doc
# This is a library
api/rust/Cargo.lock
# Don't push compiled WLCS
wlcs

15
compile_wlcs.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
WLCS_SHA=26c5a8cfef265b4ae021adebfec90d758c08792e
if [ -f "./wlcs/wlcs" ] && [ "$(cd wlcs; git rev-parse HEAD)" = "${WLCS_SHA}" ] ; then
echo "WLCS commit 26c5a8c is already compiled"
else
echo "Compiling WLCS"
git clone https://github.com/canonical/wlcs
cd wlcs || exit
# checkout a specific revision
git reset --hard "${WLCS_SHA}"
cmake -DWLCS_BUILD_ASAN=False -DWLCS_BUILD_TSAN=False -DWLCS_BUILD_UBSAN=False -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
make
fi