Skip to content

Commit

Permalink
feat(docker): Add llvm, clang and linker
Browse files Browse the repository at this point in the history
Signed-off-by: David Cerdeira <[email protected]>
  • Loading branch information
DavidMCerdeira committed Aug 19, 2024
1 parent 48d8a18 commit aa03194
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG AARCH64_TOOLCHAIN_LINK=https://armkeil.blob.core.windows.net/developer/Files
ARG AARCH32_TOOLCHAIN_LINK=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
ARG RISCV_TOOLCHAIN_LINK=https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
ARG ASMFMT_LINK=https://github.com/klauspost/asmfmt/releases/download/v1.3.2/asmfmt-Linux_x86_64_1.3.2.tar.gz
ARG CLANG_VERSION=18
ARG CLANG_TOOLS_VERSION=18
# use this repo temporarily while the patches for misra fps are not in a new official version
ARG CPPCHECK_REPO=https://github.com/danmar/cppcheck.git
ARG CPPCHECK_VERSION=2.9
Expand Down Expand Up @@ -39,7 +39,10 @@ RUN apt-get update && apt-get install -y \
vim \
nano \
device-tree-compiler \
gawk
gawk \
llvm \
clang \
lld

# Install python packages
RUN pip3 install \
Expand All @@ -65,10 +68,10 @@ RUN npm install -g cspell@latest
# Install static analyzers
# clang-format and clang-tidy
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$CLANG_VERSION main" && \
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$CLANG_TOOLS_VERSION main" && \
apt-get update && apt-get install -y \
clang-format-$CLANG_VERSION \
clang-tidy-$CLANG_VERSION
clang-format-$CLANG_TOOLS_VERSION \
clang-tidy-$CLANG_TOOLS_VERSION
# cppcheck
RUN mkdir /opt/cppcheck && git clone $CPPCHECK_REPO --depth 1 --branch $CPPCHECK_VERSION /opt/cppcheck && \
make -C /opt/cppcheck FILESDIR=/usr/share/cppcheck && make -C /opt/cppcheck install FILESDIR=/usr/share/cppcheck
Expand Down

0 comments on commit aa03194

Please sign in to comment.