build: uses correct clang++ binary for non-standard versions

This commit is contained in:
Su3h7aM
2024-04-30 16:17:19 -03:00
parent 17a01a81d8
commit 30ff15e538

View File

@@ -2,7 +2,6 @@
set -eu
: ${CPPFLAGS=}
: ${CXX=clang++}
: ${CXXFLAGS=}
: ${LDFLAGS=}
: ${LLVM_CONFIG=}
@@ -44,6 +43,8 @@ if [ -z "$LLVM_CONFIG" ]; then
fi
fi
: ${CXX=$($LLVM_CONFIG --bindir)/clang++}
LLVM_VERSION="$($LLVM_CONFIG --version)"
LLVM_VERSION_MAJOR="$(echo $LLVM_VERSION | awk -F. '{print $1}')"
LLVM_VERSION_MINOR="$(echo $LLVM_VERSION | awk -F. '{print $2}')"