Skip to content

Commit

Permalink
Add clang 16 toolchain to linux workers.
Browse files Browse the repository at this point in the history
Resolves Buildbot failures for 24 lts builders that have not migrated to
clang 17.

b/332306066
  • Loading branch information
briantting committed Apr 1, 2024
1 parent 96283a0 commit 23defd2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ x-shared-unittest-definitions: &shared-unittest-definitions
args:
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
- CLANG_16_VER=${CLANG_16_VER:-16-init-17653-g39da55e8-2}
image: cobalt-linux-x64x11-unittest
environment:
- PLATFORM=${PLATFORM:-linux-x64x11}
Expand Down Expand Up @@ -113,6 +114,7 @@ services:
# Should match version pinned by Starboard
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
- CLANG_16_VER=${CLANG_16_VER:-16-init-17653-g39da55e8-2}
image: cobalt-build-base
depends_on:
- base
Expand All @@ -126,6 +128,7 @@ services:
- FROM_IMAGE=base-bionic
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
- CLANG_16_VER=${CLANG_16_VER:-16-init-17653-g39da55e8-2}
image: build-base-bionic
depends_on:
- base-bionic
Expand Down
14 changes: 14 additions & 0 deletions docker/linux/base/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ RUN cd /tmp \
&& echo ${COBALT_CLANG_VER} >> ${COBALT_CLANG_TC_HOME}/cr_build_revision \
&& rm clang-llvmorg-${COBALT_CLANG_VER}.tgz

# === Install Clang 16 toolchain for all Linux-hosted builds
ARG CLANG_16_VER

ARG CLANG_16_TC_HOME=${TC_ROOT}/x86_64-linux-gnu-clang-chromium-${CLANG_16_VER}
ARG CLANG_16_BASE_URL=https://commondatastorage.googleapis.com/chromium-browser-clang

RUN cd /tmp \
&& mkdir -p ${CLANG_16_TC_HOME} \
&& curl --silent -O -J \
${CLANG_16_BASE_URL}/Linux_x64/clang-llvmorg-${CLANG_16_VER}.tgz \
&& tar xf clang-llvmorg-${CLANG_16_VER}.tgz -C ${CLANG_16_TC_HOME} \
&& echo ${CLANG_16_VER} >> ${CLANG_16_TC_HOME}/cr_build_revision \
&& rm clang-llvmorg-${CLANG_16_VER}.tgz

RUN git config --global --add safe.directory /code

WORKDIR /code
Expand Down
23 changes: 23 additions & 0 deletions docker/linux/unittest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,29 @@ RUN cd /tmp \
&& echo ${COBALT_CLANG_VER} >> ${COBALT_CLANG_TC_HOME}/cr_build_revision \
&& rm llvm-code-coverage-llvmorg-${COBALT_CLANG_VER}.tgz

# === Install Clang 16 toolchain for llvm-symbolization.
ARG CLANG_16_VER

ARG CLANG_16_TC_HOME=${TC_ROOT}/x86_64-linux-gnu-clang-chromium-${CLANG_16_VER}
ARG CLANG_16_BASE_URL=https://commondatastorage.googleapis.com/chromium-browser-clang

RUN cd /tmp \
&& mkdir -p ${CLANG_16_TC_HOME} \
&& curl --silent -O -J \
${CLANG_16_BASE_URL}/Linux_x64/clang-llvmorg-${CLANG_16_VER}.tgz \
&& tar xf clang-llvmorg-${CLANG_16_VER}.tgz -C ${CLANG_16_TC_HOME} \
&& echo ${CLANG_16_VER} >> ${CLANG_16_TC_HOME}/cr_build_revision \
&& rm clang-llvmorg-${CLANG_16_VER}.tgz

# === Install Clang 16 toolchain coverage tools.
RUN cd /tmp \
&& mkdir -p ${CLANG_16_TC_HOME} \
&& curl --silent -O -J \
${CLANG_16_BASE_URL}/Linux_x64/llvm-code-coverage-llvmorg-${CLANG_16_VER}.tgz \
&& tar xf llvm-code-coverage-llvmorg-${CLANG_16_VER}.tgz -C ${CLANG_16_TC_HOME} \
&& echo ${CLANG_16_VER} >> ${CLANG_16_TC_HOME}/cr_build_revision \
&& rm llvm-code-coverage-llvmorg-${CLANG_16_VER}.tgz

WORKDIR /out
# Sets the locale in the environment. This is needed for NPLB unit tests.
ENV LANG en_US.UTF-8
Expand Down

0 comments on commit 23defd2

Please sign in to comment.