devtools: test meson build with available compilers

Allow the script to run with a reduced set of builds if clang, or
other compilers, are missing.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
Bruce Richardson 2019-07-02 15:44:42 +01:00 committed by Thomas Monjalon
parent ca9268529d
commit d6917418e4

View File

@ -28,6 +28,7 @@ build () # <directory> <meson options>
{
builddir=$1
shift
if command -v $CC >/dev/null 2>&1 ; then
if [ ! -f "$builddir/build.ninja" ] ; then
options="--werror -Dexamples=all $*"
echo "$MESON $options $srcdir $builddir"
@ -46,6 +47,7 @@ build () # <directory> <meson options>
echo "$ninja_cmd -C $builddir"
$ninja_cmd -C $builddir
fi
fi
}
if [ "$1" = "-vv" ] ; then
@ -80,7 +82,7 @@ build build-x86-default -Dmachine=$default_machine $use_shared
c=aarch64-linux-gnu-gcc
if command -v $c >/dev/null 2>&1 ; then
# compile the general v8a also for clang to increase coverage
export CC="ccache clang"
export CC="clang"
build build-arm64-host-clang $use_shared \
--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc