Commit 8e848ba6 authored by Mohit Agarwal's avatar Mohit Agarwal Committed by Ian Lance Taylor

misc/cgo/testsanitizers: fix check for existence of clang

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/16752Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 6c967c0a
......@@ -10,7 +10,7 @@ set -e
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment