aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-05-26 19:16:32 +0100
committerGitHub <noreply@github.com>2024-05-26 19:16:32 +0100
commit8421950546c9f4c929cf5cba3081c7c63a143be8 (patch)
tree28f7bb2ea25d81ec2bddca3389f898e83228df29
parent149ae70be16a94cbd82a9548096cf4335c7c35c4 (diff)
parent5027cfb6189879ddd0d5cdaca9280235837ce9a0 (diff)
Merge pull request #3637 from laytan/revert-clang++-detection
revert `$(llvm-config --bindir)/clang++` to get the cpp compiler
-rwxr-xr-xbuild_odin.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_odin.sh b/build_odin.sh
index c27ad119d..ec65bb49d 100755
--- a/build_odin.sh
+++ b/build_odin.sh
@@ -45,7 +45,13 @@ if [ -z "$LLVM_CONFIG" ]; then
fi
fi
-: ${CXX=$($LLVM_CONFIG --bindir)/clang++}
+if [ -x "$(which clang++)" ]; then
+ : ${CXX="clang++"}
+elif [ -x "$($LLVM_CONFIG --bindir)/clang++" ]; then
+ : ${CXX=$($LLVM_CONFIG --bindir)/clang++}
+else
+ error "No clang++ command found. Set CXX to proceed."
+fi
LLVM_VERSION="$($LLVM_CONFIG --version)"
LLVM_VERSION_MAJOR="$(echo $LLVM_VERSION | awk -F. '{print $1}')"