Przeglądaj źródła

Merge pull request #3637 from laytan/revert-clang++-detection

revert `$(llvm-config --bindir)/clang++` to get the cpp compiler
gingerBill 1 rok temu
rodzic
commit
8421950546
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      build_odin.sh

+ 7 - 1
build_odin.sh

@@ -45,7 +45,13 @@ if [ -z "$LLVM_CONFIG" ]; then
 	fi
 	fi
 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="$($LLVM_CONFIG --version)"
 LLVM_VERSION_MAJOR="$(echo $LLVM_VERSION | awk -F. '{print $1}')"
 LLVM_VERSION_MAJOR="$(echo $LLVM_VERSION | awk -F. '{print $1}')"