ci: Install LLVM Embedded Toolchain for Arm
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
b16ed003f1
commit
4ea0c905e6
|
@ -46,7 +46,7 @@ case ${os} in
|
|||
brew update --quiet
|
||||
;;
|
||||
Linux)
|
||||
install="python-tools codechecker clang_clang-tidy gen-romfs gperf kconfig-frontends rust arm-gcc-toolchain arm64-gcc-toolchain mips-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain rx-gcc-toolchain sparc-gcc-toolchain c-cache"
|
||||
install="python-tools codechecker clang_clang-tidy gen-romfs gperf kconfig-frontends rust arm-clang-toolchain arm-gcc-toolchain arm64-gcc-toolchain mips-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain rx-gcc-toolchain sparc-gcc-toolchain c-cache"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -169,6 +169,19 @@ function bloaty {
|
|||
fi
|
||||
}
|
||||
|
||||
function arm-clang-toolchain {
|
||||
add_path "${prebuilt}"/clang-arm-none-eabi/bin
|
||||
|
||||
if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
|
||||
cd "${prebuilt}"
|
||||
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
|
||||
rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
|
||||
fi
|
||||
clang --version
|
||||
}
|
||||
|
||||
function arm-gcc-toolchain {
|
||||
add_path "${prebuilt}"/gcc-arm-none-eabi/bin
|
||||
|
||||
|
|
|
@ -90,6 +90,11 @@ RUN mkdir gcc-arm-none-eabi && \
|
|||
&& curl -s -L -O "https://raw.githubusercontent.com/apache/incubator-nuttx/master/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch" \
|
||||
&& patch -p0 < arm-none-eabi-workaround-for-newlib-version-break.patch
|
||||
|
||||
# Download the latest ARM clang toolchain prebuilt by ARM
|
||||
RUN mkdir clang-arm-none-eabi && \
|
||||
curl -s -L "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz" \
|
||||
| tar -C clang-arm-none-eabi --strip-components 1 -xz
|
||||
|
||||
###############################################################################
|
||||
# Build image for tool required by ARM64 builds
|
||||
###############################################################################
|
||||
|
@ -300,6 +305,9 @@ ENV PATH="/tools/rust/cargo/bin:$PATH"
|
|||
COPY --from=nuttx-toolchain-arm /tools/gcc-arm-none-eabi/ gcc-arm-none-eabi/
|
||||
ENV PATH="/tools/gcc-arm-none-eabi/bin:$PATH"
|
||||
|
||||
COPY --from=nuttx-toolchain-arm /tools/clang-arm-none-eabi/ clang-arm-none-eabi/
|
||||
ENV PATH="/tools/clang-arm-none-eabi/bin:$PATH"
|
||||
|
||||
# ARM64 toolchain
|
||||
COPY --from=nuttx-toolchain-arm64 /tools/gcc-aarch64-none-elf/ gcc-aarch64-none-elf/
|
||||
ENV PATH="/tools/gcc-aarch64-none-elf/bin:$PATH"
|
||||
|
|
Loading…
Reference in New Issue