瀏覽代碼

revert `$(llvm-config --bindir)/clang++` to get the cpp compiler

A few reports of either people not having this clang++ or having it but
it not finding system headers. On top of that, the reason we added this
in the first place was a bug that surfaced on clang-18 which we've since
fixed.

Order will now be clang++ from path, then the llvm bindir clang++, then an
error.

This can all still be overwritten with `CXX=blah make` like before.
Laytan Laats 1 年之前
父節點
當前提交
5027cfb618
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      build_odin.sh

+ 7 - 1
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}')"