summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-07-02 15:44:42 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-07-02 18:07:58 +0200
commitd6917418e4e92a1d4ac0198ffb622cdce9d782a9 (patch)
treed6c844011d901cc73628fafbf7e953630e1070e5
parentca9268529d2be1764054591ad57a7aac008e16b4 (diff)
downloaddpdk-next-eventdev-d6917418e4e92a1d4ac0198ffb622cdce9d782a9.zip
dpdk-next-eventdev-d6917418e4e92a1d4ac0198ffb622cdce9d782a9.tar.gz
dpdk-next-eventdev-d6917418e4e92a1d4ac0198ffb622cdce9d782a9.tar.xz
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>
-rwxr-xr-xdevtools/test-meson-builds.sh38
1 files changed, 20 insertions, 18 deletions
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6..fe11e3c 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -28,23 +28,25 @@ build () # <directory> <meson options>
{
builddir=$1
shift
- if [ ! -f "$builddir/build.ninja" ] ; then
- options="--werror -Dexamples=all $*"
- echo "$MESON $options $srcdir $builddir"
- $MESON $options $srcdir $builddir
- unset CC
- fi
- if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then
- # for full output from ninja use "-v"
- echo "$ninja_cmd -v -C $builddir"
- $ninja_cmd -v -C $builddir
- elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then
- # for keeping the history of short cmds, pipe through cat
- echo "$ninja_cmd -C $builddir | cat"
- $ninja_cmd -C $builddir | cat
- else
- echo "$ninja_cmd -C $builddir"
- $ninja_cmd -C $builddir
+ if command -v $CC >/dev/null 2>&1 ; then
+ if [ ! -f "$builddir/build.ninja" ] ; then
+ options="--werror -Dexamples=all $*"
+ echo "$MESON $options $srcdir $builddir"
+ $MESON $options $srcdir $builddir
+ unset CC
+ fi
+ if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then
+ # for full output from ninja use "-v"
+ echo "$ninja_cmd -v -C $builddir"
+ $ninja_cmd -v -C $builddir
+ elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then
+ # for keeping the history of short cmds, pipe through cat
+ echo "$ninja_cmd -C $builddir | cat"
+ $ninja_cmd -C $builddir | cat
+ else
+ echo "$ninja_cmd -C $builddir"
+ $ninja_cmd -C $builddir
+ fi
fi
}
@@ -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