diff --git a/env.sh b/env.sh index 0723030b..578bef1d 100644 --- a/env.sh +++ b/env.sh @@ -16,6 +16,12 @@ hscloud_path="$hscloud_root/bazel-bin/tools:$hscloud_root/bazel-bin/cluster/tool unset -f hscloud_root unset -f hscloud_path +if command -v clang &> /dev/null; then + # if we have clang, use it + # avoids weird PATH issues with linkers, eg https://github.com/bazelbuild/bazel/issues/18834 + export CC=clang +fi + # Leftover junk. This should be removed, as env.sh is now optional. # Do _not_ add more aliases! alias bajzel=bazel