diff --git a/arm-software/embedded/scripts/build_atfe_sanitizer.sh b/arm-software/embedded/scripts/build_atfe_sanitizer.sh deleted file mode 100755 index 9684988b95d2..000000000000 --- a/arm-software/embedded/scripts/build_atfe_sanitizer.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2025, Arm Limited and affiliates. -# Part of the Arm Toolchain project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# A bash script to build the Arm Toolchain for Embedded, with address sanitizer enabled. - -# Script implements 2-stage pipeline: first clang is built using arm-toolchain sources. -# Then this clang is used to compile ATfE sanitizer build. -# -# The script creates a build of the toolchain in the 'build' directory, inside -# the repository tree. - -# If FVPs have been installed, the environment variable `FVP_INSTALL_DIR` -# should be set to their install location to enable their use in tests. - -set -ex - -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -REPO_ROOT=$( git -C "${SCRIPT_DIR}" rev-parse --show-toplevel ) - -clang --version - -export CC=clang -export CXX=clang++ - -# Stage 1: Compile clang -mkdir -p "${REPO_ROOT}"/build_llvm -cd "${REPO_ROOT}"/build_llvm - -cmake ../llvm -G Ninja \ - -DLLVM_ENABLE_PROJECTS="clang;llvm;lld" \ - -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCLANG_DEFAULT_LINKER="lld" - -ninja - -echo "==> Stage 1: Completed clang build" - -# Stage 2: Compile ATfE with sanitizer -export CC="${REPO_ROOT}/build_llvm/bin/clang" -export CXX="${REPO_ROOT}/build_llvm/bin/clang++" - -if [[ ! -z "${FVP_INSTALL_DIR}" ]]; then - EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DENABLE_FVP_TESTING=ON -DFVP_INSTALL_DIR=${FVP_INSTALL_DIR}" -fi - -mkdir -p "${REPO_ROOT}"/build -cd "${REPO_ROOT}"/build - -# Flag to disable detection of memory leaks in address sanitizer. -export ASAN_OPTIONS=detect_leaks=0 - -cmake ../arm-software/embedded \ - -GNinja \ - -DFETCHCONTENT_QUIET=OFF \ - -DCMAKE_C_COMPILER=$CC \ - -DCMAKE_CXX_COMPILER=$CXX \ - -DCMAKE_BUILD_TYPE=Release \ - -DCPACK_PACKAGE_DIRECTORY=atfe_packages \ - -DLLVM_USE_SANITIZER="Address;Undefined" \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - ${EXTRA_CMAKE_ARGS} - -ninja package-llvm-toolchain - -# Remove CPack working directory. -rm -rf atfe_packages/_CPack_Packages - -echo "==> Stage 2: Completed sanitizer build" diff --git a/arm-software/embedded/scripts/test_atfe_sanitizer.sh b/arm-software/embedded/scripts/test_atfe_sanitizer.sh deleted file mode 100755 index 774bb04953fd..000000000000 --- a/arm-software/embedded/scripts/test_atfe_sanitizer.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2025, Arm Limited and affiliates. -# Part of the Arm Toolchain project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# A bash script to run the tests from the Arm Toolchain for Embedded, when sanitizers -# are enabled. - -# The script assumes a successful build of the toolchain exists in the 'build' -# directory inside the repository tree. - -# Script does not exit, when the command in the script exits with a non-zero status. -# Also, print the line of the script being executed. -set -vx - -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -REPO_ROOT=$( git -C "${SCRIPT_DIR}" rev-parse --show-toplevel ) - -# If a test fails, lit will ordinarily return a non-zero result, -# which prevents further testing. Setting the --ignore-fail option -# will cause testing to continue, so that CI systems can get a -# full set of results. -# The lit test suites do not generate xml results by default. -# This can be enabled with the --xunit-xml-output option. The file -# written will be relative to the individual suite's build directly, -# so the same name can be used for all files for consistency. -export LIT_OPTS="--ignore-fail --xunit-xml-output=lit_results.junit.xml" - -# Command for each test is splitted across individual lines, to aid in debugging. -cd "${REPO_ROOT}"/build -ninja -k 0 check-all \ - check-compiler-rt-armv7m_hard_fpv5_d16_exn_rtti_unaligned_size \ - check-picolibc-armv7m_hard_fpv5_d16_exn_rtti_unaligned_size \ - check-cxx-armv7m_hard_fpv5_d16_exn_rtti_unaligned_size \ - check-cxxabi-armv7m_hard_fpv5_d16_exn_rtti_unaligned_size \ - check-unwind-armv7m_hard_fpv5_d16_exn_rtti_unaligned_size