Add clang-13 on host compiler option. Add some sanity checks to verify if the compiler is installed on the host.
Signed-off-by: Tudor Ambarus tudor.ambarus@linaro.org --- syzkaller-start | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/syzkaller-start b/syzkaller-start index 5e44a69..fd9b853 100755 --- a/syzkaller-start +++ b/syzkaller-start @@ -161,6 +161,7 @@ while [[ ${COMPILER_CHOICE} -lt 1 || ${COMPILER_CHOICE} -gt 11 ]]; do echo -e "\t8. [clang 8.0.0 (trunk 343298)]" echo -e "\t9. [clang 10.0.0 (c2443155)]" echo -e "\t10. [clang 11.0.1 (llvm-11.0.1)]" + echo -e "\t11. [clang 13 (on host)]" echo -n "> " read COMPILER_CHOICE
@@ -223,6 +224,14 @@ while [ "${COMPILER_VERSION}" == "" ]; do COMPILER_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/clang+..." COMPILER_VERSION="clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-20.10" ;; + 11) + COMPILER="clang-13" + if ! [ -x "$(command -v ${COMPILER})" ]; then + print_red "ERROR: ${COMPILER} is not installed on host" + exit 1 + fi + COMPILER_VERSION="$(${COMPILER} -dumpversion)" + ;; *) print_red "ERROR: Something went wrong" exit 1 @@ -264,6 +273,8 @@ download_and_set_compiler()
if [ -n "${COMPILER_URL}" ]; then download_and_set_compiler +else + print_blue "\nUsing ${COMPILER_VERSION}" fi
IMAGEDIR=${SYZKALLERDIR}/images