contrib/jenkins: tweak shell logic

Move the logic down to where make gets called, so we don't need the
variable. Print whether we use CLANG or GCC.

Don't put /opt/llvm-arm/bin infront of PATH unless building with CLANG.
Right now it doesn't seem to have e.g. an override for gcc, but the
files in that path may change when we update
LLVM-embedded-toolchain-for-Arm.

Related: OS#6026
Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c
This commit is contained in:
Oliver Smith
2023-05-16 09:41:33 +02:00
parent 749dcdc277
commit 968d0b94f6

View File

@@ -38,7 +38,6 @@ cd $TOPDIR/firmware
for build in $BUILDS; do for build in $BUILDS; do
board=`echo $build | cut -d "/" -f 1` board=`echo $build | cut -d "/" -f 1`
app=`echo $build | cut -d "/" -f 2` app=`echo $build | cut -d "/" -f 2`
[ "$app" == "dfu" ] && use_clang_for_bl=1 || use_clang_for_bl=0
case "$build" in case "$build" in
"owhw/cardem") "owhw/cardem")
comb="combined" comb="combined"
@@ -57,9 +56,16 @@ for build in $BUILDS; do
;; ;;
esac esac
echo echo
echo "=============== $board / $app START ==============" # Build the bootloader with clang, the rest with gcc (OS#5260, OS#6026)
PATH="/opt/llvm-arm/bin:$PATH" make USE_CLANG="$use_clang_for_bl" BOARD="$board" APP="$app" $comb if [ "$app" = "dfu" ]; then
echo "=============== $board / $app RES:$? ==============" echo "=============== $board / $app START (CLANG) =============="
PATH="/opt/llvm-arm/bin:$PATH" make USE_CLANG=1 BOARD="$board" APP="$app" $comb
echo "=============== $board / $app RES:$? =============="
else
echo "=============== $board / $app START (GCC) =============="
make USE_CLANG=0 BOARD="$board" APP="$app" $comb
echo "=============== $board / $app RES:$? =============="
fi
done done
echo echo