From 7abd8d377fd173fa930693cbb8068fd1ddaaf93f Mon Sep 17 00:00:00 2001 From: Tyler Smith <74526874+tylertms@users.noreply.github.com> Date: Thu, 12 Nov 2026 06:33:47 -0500 Subject: [PATCH] ci: build the Linux command with LLVM 21, since the C build passes a flag Clang 15 lacks --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/release.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95a63fd7d1..c5b122904b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,12 +71,16 @@ jobs: - name: Put LLVM on PATH run: | - # Mbed TLS takes -mllvm --disable-select-optimize, LLVM 15 and newer. + # The C build passes --no-default-config, which Clang 16 and newer + # take; Linux uses the LLVM 21 the boot program builds with. case "$RUNNER_OS" in Windows) echo 'C:\Program Files\LLVM\bin' >> "$GITHUB_PATH" ;; Linux) - [[ -d /usr/lib/llvm-15/bin ]] || { sudo apt-get update -q && sudo apt-get install -y -q clang-15; } - echo /usr/lib/llvm-15/bin >> "$GITHUB_PATH" + curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc >/dev/null + echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm-21.list + sudo apt-get update -q + sudo apt-get install -y -q --no-install-recommends clang-21 llvm-21 + echo /usr/lib/llvm-21/bin >> "$GITHUB_PATH" ;; esac diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96b5795422..6b041fe058 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -236,12 +236,16 @@ jobs: - name: Put LLVM on PATH run: | - # Mbed TLS takes -mllvm --disable-select-optimize, LLVM 15 and newer. + # The C build passes --no-default-config, which Clang 16 and newer + # take; Linux uses the LLVM 21 the boot program builds with. case "$RUNNER_OS" in Windows) echo 'C:\Program Files\LLVM\bin' >> "$GITHUB_PATH" ;; Linux) - [[ -d /usr/lib/llvm-15/bin ]] || { sudo apt-get update -q && sudo apt-get install -y -q clang-15; } - echo /usr/lib/llvm-15/bin >> "$GITHUB_PATH" + curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc >/dev/null + echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm-21.list + sudo apt-get update -q + sudo apt-get install -y -q --no-install-recommends clang-21 llvm-21 + echo /usr/lib/llvm-21/bin >> "$GITHUB_PATH" ;; esac