aboutsummaryrefslogtreecommitdiffstats
path: root/tools/docker
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-03-25 18:04:17 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-04-06 17:14:45 +0200
commit84a18a469934515d2d5e06393bed04759df7aae1 (patch)
treec3c9a84a1a0c52a335e4b0e1bc7142ffdbe58062 /tools/docker
parent71a2f2b60713b8c94deaea628f6a25ad6c119eca (diff)
tools/docker: use clang-13
Diffstat (limited to 'tools/docker')
-rw-r--r--tools/docker/big-env/Dockerfile14
-rw-r--r--tools/docker/env/Dockerfile15
-rw-r--r--tools/docker/syzbot/Dockerfile13
3 files changed, 25 insertions, 17 deletions
diff --git a/tools/docker/big-env/Dockerfile b/tools/docker/big-env/Dockerfile
index 267f69203..d6b02582d 100644
--- a/tools/docker/big-env/Dockerfile
+++ b/tools/docker/big-env/Dockerfile
@@ -55,19 +55,5 @@ ENV PATH /usr/local/google-cloud-sdk/bin:$PATH
RUN gcloud components install --quiet app-engine-python app-engine-go app-engine-python-extras cloud-datastore-emulator
RUN chmod 0777 /usr/local/google-cloud-sdk
-# Debian Buster provides only clang-7 which is quite old,
-# in particular it does not detect some warnings that later fire on OpenBSD.
-# Install clang-14 from https://apt.llvm.org.
-RUN apt-get install -y -q gnupg software-properties-common apt-transport-https
-# Without this I am getting error:
-# aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Debian
-RUN apt-get install -y -q --reinstall base-files
-RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye main"
-RUN apt-get update --allow-releaseinfo-change
-RUN apt-get remove -y -q clang-11
-RUN apt-get install -y -q --no-install-recommends clang-14
-RUN apt autoremove -y -q
-
RUN echo "export PS1='syz-big-env🈶 '" > /syzkaller/.bashrc
ENV SYZ_BIG_ENV yes
diff --git a/tools/docker/env/Dockerfile b/tools/docker/env/Dockerfile
index 3e43cfef7..2610738ee 100644
--- a/tools/docker/env/Dockerfile
+++ b/tools/docker/env/Dockerfile
@@ -9,8 +9,7 @@ LABEL homepage="https://github.com/google/syzkaller"
RUN apt-get update --allow-releaseinfo-change
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends \
- sudo make python nano git curl ca-certificates \
- clang-format clang-tidy binutils g++ clang \
+ sudo make python nano git curl ca-certificates binutils g++ \
g++-arm-linux-gnueabi g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu \
g++-mips64el-linux-gnuabi64 g++-s390x-linux-gnu g++-riscv64-linux-gnu \
libc6-dev-i386 libc6-dev-i386-amd64-cross lib32gcc-10-dev lib32stdc++-10-dev \
@@ -35,6 +34,18 @@ RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \
mkdir -p /syzkaller/.cache && \
chmod -R 0777 /syzkaller
+# The default clang-11 is too old, install the latest one.
+RUN apt-get install -y -q gnupg software-properties-common apt-transport-https
+RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+RUN add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
+RUN apt-get update --allow-releaseinfo-change
+RUN apt-get remove -y -q clang-11
+RUN apt-get install -y -q --no-install-recommends clang-13 clang-format-13 clang-tidy-13
+RUN apt autoremove -y -q
+RUN sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
+RUN sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-13 100
+RUN sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100
+
# Download and install the custom Clang required to build KMSAN.
# TODO(@ramosian-glider): switch to stable Clang once KMSAN is upstreamed.
ENV CLANG_KMSAN_VER 38e16e1cebb8
diff --git a/tools/docker/syzbot/Dockerfile b/tools/docker/syzbot/Dockerfile
index 7c4f2aad8..451148e99 100644
--- a/tools/docker/syzbot/Dockerfile
+++ b/tools/docker/syzbot/Dockerfile
@@ -12,7 +12,6 @@ RUN apt-get update --allow-releaseinfo-change
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
# Build essentials:
gcc g++ binutils make ccache \
- clang clang-format clang-tidy \
# Some common utilities:
unzip curl sudo procps psmisc nano vim git bzip2 dh-autoreconf software-properties-common \
# These are needed to build Linux kernel:
@@ -32,6 +31,18 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
RUN curl https://dl.google.com/go/go1.17.linux-amd64.tar.gz | tar -C /usr/local -xz
ENV PATH /usr/local/go/bin:$PATH
+# The default clang-11 is too old, install the latest one.
+RUN apt-get install -y -q gnupg software-properties-common apt-transport-https
+RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+RUN add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
+RUN apt-get update --allow-releaseinfo-change
+RUN apt-get remove -y -q clang-11
+RUN apt-get install -y -q --no-install-recommends clang-13 clang-format-13 clang-tidy-13
+RUN apt autoremove -y -q
+RUN sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
+RUN sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-13 100
+RUN sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100
+
# Download and install the custom Clang required to build KMSAN.
# TODO(@ramosian-glider): switch to stable Clang once KMSAN is upstreamed.
ENV CLANG_KMSAN_VER 38e16e1cebb8