mirror of
https://github.com/golang/go
synced 2024-11-23 09:00:04 -07:00
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/16752 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
6c967c0ad2
commit
8e848ba653
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user