1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Fix build script when llvm isn't installed

This commit is contained in:
disarray2077 2024-02-17 15:04:04 -03:00
parent f344ecc7c0
commit ae6f7fbf8b

View file

@ -43,21 +43,8 @@ else
echo "Ninja isn't installed, consider installing it for faster build speeds." echo "Ninja isn't installed, consider installing it for faster build speeds."
fi fi
# exit when any command fails LLVM_CONFIG=$(command -v llvm-config-13 2>/dev/null || command -v llvm-config 2>/dev/null)
set -e
### Dependencies ###
if [ ! -f ../BeefySysLib/third_party/libffi/Makefile ]; then
echo Building libffi...
cd ../BeefySysLib/third_party/libffi
./configure
make
cd $SCRIPTPATH
fi
LLVM_FOUND=0 LLVM_FOUND=0
LLVM_CONFIG=$(which llvm-config-13 2>/dev/null || which llvm-config 2>/dev/null)
if [ -n "$LLVM_CONFIG" ]; then if [ -n "$LLVM_CONFIG" ]; then
LLVM_VERSION=$($LLVM_CONFIG --version) LLVM_VERSION=$($LLVM_CONFIG --version)
@ -67,12 +54,25 @@ if [ -n "$LLVM_CONFIG" ]; then
fi fi
fi fi
# exit when any command fails
set -e
### Dependencies ###
if [ ! -f ../extern/llvm_linux_13_0_1/_Done.txt ] && [ $LLVM_FOUND == 0 ]; then if [ ! -f ../extern/llvm_linux_13_0_1/_Done.txt ] && [ $LLVM_FOUND == 0 ]; then
echo "ERROR: LLVM 13 was not detected on your system. Please install the package 'llvm-13-dev' and try again." >&2 echo "ERROR: LLVM 13 was not detected on your system. Please install the package 'llvm-13-dev' and try again." >&2
echo "ERROR: As an alternative, you can compile LLVM from source using the script 'extern/llvm_build.sh'." >&2 echo "ERROR: As an alternative, you can compile LLVM from source using the script 'extern/llvm_build.sh'." >&2
exit exit
fi fi
if [ ! -f ../BeefySysLib/third_party/libffi/Makefile ]; then
echo Building libffi...
cd ../BeefySysLib/third_party/libffi
./configure
make
cd $SCRIPTPATH
fi
### LIBS ### ### LIBS ###
cd .. cd ..