Build: Specify compiler path in bash
This patch is to prepare CI scripts to support multi compiler versions.
All versions of compilers will be installed by DockerFile to specific
path. The paths will be recoreded in env variables.
Every single config build job can select the needed compiler version
and add the specific compiler path to env PATH.
By default, GCC v7.3.1 & ARMClang 6.13 are choosen.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: Id4bafadfd28e95a14dc26c7641bcf9611c65e58a
diff --git a/run-build.sh b/run-build.sh
index 34373d8..9c2d2f5 100755
--- a/run-build.sh
+++ b/run-build.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -25,12 +25,20 @@
cat /etc/issue
uname -a
grep -c ^processor /proc/cpuinfo
-armclang --version
-arm-none-eabi-gcc --version
cmake --version
python --version
make --version
+# Export specific compiler path to env PATH
+compiler_path="${COMPILER_VERSION}_PATH"
+export PATH=$PATH:"${!compiler_path}"
+# Show compiler version
+if [ $COMPILER_VERSION =~ "ARMCLANG" ] ; then
+ armclang --version
+else
+ arm-none-eabi-gcc --version
+fi
+
set -ex
build_commands=$(python3 tf-m-ci-scripts/configs.py -b -g all $CONFIG_NAME)