The current mechanism fails if clang cannot be executed by the current
user. Using the `-x` operator for `test` return TRUE if the file is
executable by the user.
Change-Id: I0f3c8dc3880c1ce5a8a833ff3109eb96853184af
Reviewed-on: https://go-review.googlesource.com/16752
Reviewed-by: Ian Lance Taylor <iant@golang.org>
# The sanitizers were originally developed with clang, so prefer it.
CC=cc
-if test "$(type -p clang)" != ""; then
+if test -x "$(type -p clang)"; then
CC=clang
fi
export CC