mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Use pre-built LLVM if available
This commit is contained in:
parent
1c310e1bec
commit
ec2d888470
7 changed files with 255 additions and 178 deletions
20
bin/build.sh
20
bin/build.sh
|
@ -56,11 +56,21 @@ if [ ! -f ../BeefySysLib/third_party/libffi/Makefile ]; then
|
|||
cd $SCRIPTPATH
|
||||
fi
|
||||
|
||||
if [ ! -f ../extern/llvm_linux_13_0_1/_Done.txt ]; then
|
||||
echo Building LLVM...
|
||||
cd ../extern
|
||||
./llvm_build.sh
|
||||
cd $SCRIPTPATH
|
||||
LLVM_FOUND=0
|
||||
LLVM_CONFIG=$(which llvm-config-13 2>/dev/null || which llvm-config 2>/dev/null)
|
||||
|
||||
if [ -n "$LLVM_CONFIG" ]; then
|
||||
LLVM_VERSION=$($LLVM_CONFIG --version)
|
||||
LLVM_MAJOR_VERSION=$(echo "$LLVM_VERSION" | cut -d. -f1)
|
||||
if [ "$LLVM_MAJOR_VERSION" = "13" ]; then
|
||||
LLVM_FOUND=1
|
||||
fi
|
||||
fi
|
||||
|
||||
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: As an alternative, you can compile LLVM from source using the script 'extern/llvm_build.sh'." >&2
|
||||
exit
|
||||
fi
|
||||
|
||||
### LIBS ###
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue