__HostArch=x86
;;
- x86_64)
+ x86_64|amd64)
__BuildArch=x64
__HostArch=x64
;;
-clang*)
__Compiler=clang
# clangx.y or clang-x.y
- version="$(echo "$lowerI" | tr -d '[:alpha:]-=')"
+ version="$(echo "$1" | tr -d '[:alpha:]-=')"
parts=(${version//./ })
__ClangMajorVersion="${parts[0]}"
__ClangMinorVersion="${parts[1]}"
desired_version="$1$2"
elif command -v "$compiler-$1$2" > /dev/null; then
desired_version="-$1$2"
+ elif command -v "$compiler$1" > /dev/null; then
+ desired_version="$1"
+ elif command -v "$compiler-$1" > /dev/null; then
+ desired_version="-$1"
fi
echo "$desired_version"
# Set default versions
if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
- if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
+ if [ "$compiler" = "clang" ]; then versions=( 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi
for version in "${versions[@]}"; do
elif command -v "clang-$2$3" > /dev/null
then
desired_llvm_version="-$2$3"
+elif command -v "clang-$2" > /dev/null
+ then
+ desired_llvm_version="-$2"
+elif command -v "clang$2" > /dev/null
+ then
+ desired_llvm_version="$2"
elif command -v clang > /dev/null
then
desired_llvm_version=