From 07a2fa8d578c0c516c0a894c2630e3bfeab3a1a9 Mon Sep 17 00:00:00 2001 From: W-Mai <1341398182@qq.com> Date: Mon, 24 Oct 2022 12:03:24 +0800 Subject: [PATCH] ci/docker: copy `clang-extdef-mapping` to clang-arm Clang relies on clang-extdef-mapping for ctu checking. But clang-arm doesn't provide this file A tweaking way to support this feature is copy a `clang-extdef-mapping` from other clang version. Signed-off-by: xinbingnan --- .github/workflows/build.yml | 2 +- tools/ci/cibuild.sh | 1 + tools/ci/docker/linux/Dockerfile | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a21fe444d..46bcd39788 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,7 +163,7 @@ jobs: if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then ./cibuild.sh -A -R -c --codechecker testlist/${{matrix.boards}}.dat else - ./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat + ./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat fi ccache -s diff --git a/tools/ci/cibuild.sh b/tools/ci/cibuild.sh index a980d47a23..2cd066dbda 100755 --- a/tools/ci/cibuild.sh +++ b/tools/ci/cibuild.sh @@ -177,6 +177,7 @@ function arm-clang-toolchain { curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi + cp /usr/bin/clang-extdef-mapping-10 clang-arm-none-eabi/bin/clang-extdef-mapping rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz fi clang --version diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index be20984c7e..fe92c9d924 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -308,6 +308,7 @@ ENV PATH="/tools/rust/cargo/bin:$PATH" # ARM toolchain COPY --from=nuttx-toolchain-arm /tools/clang-arm-none-eabi/ clang-arm-none-eabi/ +CMD cp /usr/bin/clang-extdef-mapping-10 clang-arm-none-eabi/bin/clang-extdef-mapping ENV PATH="/tools/clang-arm-none-eabi/bin:$PATH" COPY --from=nuttx-toolchain-arm /tools/gcc-arm-none-eabi/ gcc-arm-none-eabi/