Skip to content

Commit

Permalink
[lang-c] update to v18 (#1377)
Browse files Browse the repository at this point in the history
* [lang-c] update to v18

Co-authored-by: Jiawen Geng <[email protected]>

* Update changelog
* Major version test


---------

Co-authored-by: Jiawen Geng <[email protected]>
  • Loading branch information
kylos101 and gengjiawen committed Jul 2, 2024
1 parent a1a0eee commit a7cae36
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

A curated, chronologically ordered list of notable changes in [Gitpod's default workspace images](https://hub.docker.com/u/gitpod).

## 2024-07-01

- Bump Clang to `18` and enable ASAN Support.

## 2024-06-17

- Bump Rust to `1.79.0`
Expand Down
26 changes: 14 additions & 12 deletions chunks/lang-c/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ ENV TRIGGER_REBUILD=1

RUN curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ \
llvm-toolchain-jammy-17 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null \
llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null \
&& apt update \
&& install-packages \
clang-17 \
clangd-17 \
clang-format-17 \
clang-tidy-17 \
clang-18 \
clangd-18 \
clang-format-18 \
clang-tidy-18 \
gdb \
lld-17
lld-18 \
libclang-18-dev \
clang-tools-18

RUN sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-17/bin/clang 100 \
&& sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-17/bin/clang++ 100 \
&& sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-17 100 \
&& sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-17 100 \
&& sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100 \
&& sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-17 100
RUN sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-18/bin/clang 100 \
&& sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-18/bin/clang++ 100 \
&& sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-18 100 \
&& sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100 \
&& sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100 \
&& sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-18 100

USER gitpod
5 changes: 5 additions & 0 deletions tests/lang-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@
command: [wc,/etc/apt/sources.list.d/llvm.list]
assert:
- status == 0
- desc: it should have major version
command: [clang,--version]
assert:
- status == 0
- stdout.indexOf("clang version 18") != -1

0 comments on commit a7cae36

Please sign in to comment.