Ensure clang is present

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-12-18 19:53:25 +00:00
parent 66cbc83844
commit 0c5bfe816f

View file

@ -189,9 +189,9 @@ pre_initialize_variables () {
if [ -z "${MAKEFLAGS+set}" ]; then
export MAKEFLAGS="-j$(all_sh_nproc)"
fi
# if CC is not set, use clang by default to improve build times
if [ -z "${CC+set}" ]; then
export CC="clang"
# if CC is not set, use clang by default (if present) to improve build times
if [ -z "${CC+set}" ] && (type clang > /dev/null 2>&1); then
export CC=$(type -p clang)
fi
# Include more verbose output for failing tests run by CMake or make