all.sh: move clang_version() to helpers file

This function is only used in (a few) components, it's not part of the core.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2024-10-03 12:48:01 +02:00
parent 36ae06b842
commit 23fa1b5edf
2 changed files with 8 additions and 8 deletions

View File

@ -249,3 +249,11 @@ helper_armc6_build_test()
"$ARMC6_FROMELF" -z ${BUILTIN_SRC_PATH}/*.o
fi
}
clang_version() {
if command -v clang > /dev/null ; then
clang --version|grep version|sed -E 's#.*version ([0-9]+).*#\1#'
else
echo 0 # report version 0 for "no clang"
fi
}

View File

@ -858,14 +858,6 @@ pre_generate_files() {
fi
}
clang_version() {
if command -v clang > /dev/null ; then
clang --version|grep version|sed -E 's#.*version ([0-9]+).*#\1#'
else
echo 0 # report version 0 for "no clang"
fi
}
pre_load_helpers () {
# The path is going to change when this is moved to the framework
test_script_dir="${0%/*}"