Skip to content

Upgrade CI to LLVM 20 (21 for Windows ARM64) and Alpine 3.23#139

Open
robobun wants to merge 3 commits intomainfrom
claude/llvm-21-upgrade
Open

Upgrade CI to LLVM 20 (21 for Windows ARM64) and Alpine 3.23#139
robobun wants to merge 3 commits intomainfrom
claude/llvm-21-upgrade

Conversation

@robobun
Copy link

@robobun robobun commented Jan 16, 2026

Summary

  • Upgrade LLVM toolchain from version 19 to version 20 across most CI configurations
  • Upgrade Alpine Linux from 3.21 to 3.23 (musl builds)
  • Linux (glibc) builds now use LLVM 20 via apt.llvm.org
  • Windows x64 builds use LLVM 20.1.8
  • Windows ARM64 builds use LLVM 21.1.8 (better ARM64 support)
  • macOS builds use LLVM 20 via Homebrew
  • Alpine musl builds now use LLVM 21 via native packages

Changes

  • Dockerfile: Updated LLVM installation from 19 to 20 via apt.llvm.org
  • Dockerfile.musl: Updated Alpine from 3.21 to 3.23, LLVM from 19 to 21
  • build-reusable.yml: Updated default LLVM version to 20, Windows x64 Scoop package to llvm@20.1.8
  • build.yml: Updated default LLVM version to 20
  • build-preview.yml: Updated LLVM version to 20

Notes

  • macOS uses LLVM 20: LLVM 21 has libc++ ABI compatibility issues with macOS system libc++ (missing std::__1::__hash_memory symbol)
  • Windows ARM64 uses LLVM 21.1.8: Required for proper Windows ARM64 support
  • Alpine uses LLVM 21: Alpine 3.23 includes LLVM 21 as native packages
  • Ruby 3.4 fix: Added ruby-getoptlong package for Alpine 3.23 (removed from Ruby 3.4 default gems)

🤖 Generated with Claude Code

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Walkthrough

Updates LLVM toolchain versions across CI and images: GitHub Actions inputs/envs and scoop install changed from 19 → 20; the glibc Dockerfile ARG switched to 20; the musl Dockerfile independently moves to LLVM 21 and bumps Alpine from 3.21 → 3.23. (47 words)

Changes

Cohort / File(s) Changes
GitHub workflows
.github/workflows/build-preview.yml, .github/workflows/build-reusable.yml, .github/workflows/build.yml
LLVM defaults/inputs and environment variables updated from 1920; workflow fallback/input defaults set to 20; Windows x64 scoop install changed to llvm@20.1.8; macOS/ARM64 comments/notes adjusted in reusable workflow.
Docker image (glibc)
Dockerfile
ARG LLVM_VERSION changed from "19""20"; LLVM install command and related comments/refs updated to LLVM 20.
Docker image (musl)
Dockerfile.musl
LLVM toolchain bumped to 21 (ARG LLVM_VERSION -> "21"), Alpine base bumped alpine:3.21alpine:3.23, package names and envs updated to clang21/llvm21, added build envs (AR, RANLIB, LD) and ruby-getoptlong.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning PR description does not follow the WebKit project's required template format with bug tracking and reviewers. Add Bugzilla bug URL, 'Reviewed by' line, detailed explanation of changes, and format according to WebKit's pull request template.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: upgrading LLVM from version 19 to version 20 across CI configurations, with version 21 for Windows ARM64 and Alpine 3.23 update.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/build-reusable.yml:
- Around line 269-272: The CI step running "scoop install ninja llvm@21.1.8"
will fail because llvm@21.1.8 isn't in default Scoop buckets; update that
command to a supported install path: either change "scoop install ninja
llvm@21.1.8" to install an available release (e.g., "scoop install ninja llvm"
or the explicit available version like llvm 16.0.0), or add/configure the bucket
that contains llvm@21.1.8 before the install (use the appropriate scoop bucket
add command), or replace the scoop install of llvm@21.1.8 with a direct
download/install of LLVM 21.1.8 from upstream; adjust the following lines
accordingly so the PATH addition (Join-Path ... "scoop\apps\llvm\current\bin" >>
$Env:GITHUB_PATH) still points to the installed LLVM binary location.

@github-actions
Copy link

⚠️ Preview build was cancelled

This may have been caused by a newer build being triggered for the same PR.

@github-actions
Copy link

❌ Preview build failed

Check the workflow run for details.

This upgrades the LLVM toolchain from version 19 to version 20 across
most CI configurations:

- Dockerfile: Updated LLVM installation from 19 to 20 via apt.llvm.org
- build-reusable.yml: Updated default LLVM version to 20, Windows x64 to
  llvm@20.1.8, keep Windows ARM64 at LLVM 21.1.8
- build.yml: Updated default LLVM version to 20
- build-preview.yml: Updated LLVM version to 20

Note: macOS uses LLVM 20 because LLVM 21 has libc++ ABI compatibility
issues with macOS system libc++ (missing std::__1::__hash_memory).

Note: Windows ARM64 uses LLVM 21.1.8 which has better ARM64 support.

Note: Dockerfile.musl stays on clang19 as that's the latest version
available in Alpine Linux 3.21 stable.
@robobun robobun force-pushed the claude/llvm-21-upgrade branch from ee057f6 to 8260b73 Compare January 16, 2026 21:06
@robobun robobun changed the title Upgrade CI to LLVM 21 Upgrade CI to LLVM 20 (21 for Windows ARM64) Jan 16, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build-reusable.yml (1)

281-288: Version mismatch: Windows x64 uses LLVM 20.1.8, but ARM64 uses 21.1.8.

This creates an inconsistency where Windows x64 builds use LLVM 20.1.8 (line 273) while Windows ARM64 uses LLVM 21.1.8. Consider aligning both platforms to the same LLVM version for consistent build behavior, or document why the difference is intentional.

🤖 Fix all issues with AI agents
In @.github/workflows/build-reusable.yml:
- Around line 271-274: The workflow attempts to install a non-existent Scoop
package "llvm@20.1.8" (see the line "scoop install ninja llvm@20.1.8"); replace
it with a valid package/version such as "llvm" or "llvm@16.0.0" or implement the
same direct-download fallback used for ARM64 instead of pinning 20.1.8, and
ensure the surrounding commands ("scoop config use_external_7zip true" and the
PATH update via Join-Path ...) still point to the correct installed LLVM bin so
the PATH update remains correct.

Comment on lines 271 to 274
"C:\Program Files\7-Zip" >> $Env:GITHUB_PATH
scoop config use_external_7zip true
scoop install ninja llvm@19.1.7
scoop install ninja llvm@20.1.8
Join-Path (Resolve-Path ~).Path "scoop\apps\llvm\current\bin" >> $Env:GITHUB_PATH
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Scoop package llvm 20.1.8 availability main bucket

💡 Result:

No — the Scoop main bucket's llvm manifest shows version 16.0.0, not 20.1.8. [1][2]

If you need LLVM 20.1.8 you can get it from other packaging channels (Homebrew formula llvm@20 shows 20.1.8; conda/Anaconda also lists 20.1.8). [3][4]

Sources:

  • Scoop main llvm manifest (current version 16.0.0). [1]
  • Homebrew llvm@20 (stable 20.1.8). [3]
  • LLVM 20.1.8 release / Anaconda listings. [2][4]

Remove or replace llvm@20.1.8 with an available Scoop package version.

The Scoop main bucket only provides LLVM 16.0.0, not 20.1.8. Line 273 will fail when attempting to install a non-existent package version. Either use the direct download approach applied to ARM64 or specify an available version (16.0.0). Verify this is intentional before proceeding.

🤖 Prompt for AI Agents
In @.github/workflows/build-reusable.yml around lines 271 - 274, The workflow
attempts to install a non-existent Scoop package "llvm@20.1.8" (see the line
"scoop install ninja llvm@20.1.8"); replace it with a valid package/version such
as "llvm" or "llvm@16.0.0" or implement the same direct-download fallback used
for ARM64 instead of pinning 20.1.8, and ensure the surrounding commands ("scoop
config use_external_7zip true" and the PATH update via Join-Path ...) still
point to the correct installed LLVM bin so the PATH update remains correct.

@github-actions
Copy link

✅ Preview build completed

Release: autobuild-preview-pr-139-8260b731

Alpine 3.23 is the latest stable release with LLVM 21 support.
- Update base image from alpine:3.21 to alpine:3.23
- Update clang/llvm packages from version 19 to 21

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

❌ Preview build failed

Check the workflow run for details.

Ruby 3.4 removed getoptlong from default gems. Alpine 3.23 includes
Ruby 3.4, so we need to explicitly install ruby-getoptlong package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@Dockerfile.musl`:
- Around line 20-24: The Dockerfile sets LLVM paths incorrectly and hardcodes
"21": update the ENV entries (CXX, CC, LDFLAGS, CXXFLAGS, PATH) to use the
LLVM_VERSION variable and correct include vs lib dirs (use -I for includes under
/usr/lib/llvm${LLVM_VERSION}/include and -L for libs under
/usr/lib/llvm${LLVM_VERSION}/lib), remove duplicated hardcoded "21" occurrences,
and ensure PATH points to /usr/lib/llvm${LLVM_VERSION}/bin; verify the actual
Alpine package layout first and replace the current CXX/CC/LDFLAGS/CXXFLAGS/PATH
values accordingly.

Comment on lines +20 to +24
ENV CXX=clang++-21
ENV CC=clang-21
ENV LDFLAGS='-L/usr/include -L/usr/include/llvm21'
ENV CXXFLAGS="-I/usr/include -I/usr/include/llvm21"
ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:/usr/lib/llvm21/bin:$PATH"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Align LLVM paths with actual Alpine package layout (and de-duplicate with LLVM_VERSION).

-L currently points to include directories, and the llvm21 include/lib locations may be under /usr/lib/llvm21/{include,lib} on Alpine. If so, update these paths and use ${LLVM_VERSION} to avoid hardcoding.

♻️ Proposed adjustment (verify actual paths first)
-ENV CXX=clang++-21
-ENV CC=clang-21
-ENV LDFLAGS='-L/usr/include -L/usr/include/llvm21'
-ENV CXXFLAGS="-I/usr/include -I/usr/include/llvm21"
-ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:/usr/lib/llvm21/bin:$PATH"
+ENV CXX=clang++-${LLVM_VERSION}
+ENV CC=clang-${LLVM_VERSION}
+ENV LDFLAGS="-L/usr/lib/llvm${LLVM_VERSION}/lib"
+ENV CXXFLAGS="-I/usr/lib/llvm${LLVM_VERSION}/include"
+ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:/usr/lib/llvm${LLVM_VERSION}/bin:$PATH"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ENV CXX=clang++-21
ENV CC=clang-21
ENV LDFLAGS='-L/usr/include -L/usr/include/llvm21'
ENV CXXFLAGS="-I/usr/include -I/usr/include/llvm21"
ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:/usr/lib/llvm21/bin:$PATH"
ENV CXX=clang++-${LLVM_VERSION}
ENV CC=clang-${LLVM_VERSION}
ENV LDFLAGS="-L/usr/lib/llvm${LLVM_VERSION}/lib"
ENV CXXFLAGS="-I/usr/lib/llvm${LLVM_VERSION}/include"
ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:/usr/lib/llvm${LLVM_VERSION}/bin:$PATH"
🤖 Prompt for AI Agents
In `@Dockerfile.musl` around lines 20 - 24, The Dockerfile sets LLVM paths
incorrectly and hardcodes "21": update the ENV entries (CXX, CC, LDFLAGS,
CXXFLAGS, PATH) to use the LLVM_VERSION variable and correct include vs lib dirs
(use -I for includes under /usr/lib/llvm${LLVM_VERSION}/include and -L for libs
under /usr/lib/llvm${LLVM_VERSION}/lib), remove duplicated hardcoded "21"
occurrences, and ensure PATH points to /usr/lib/llvm${LLVM_VERSION}/bin; verify
the actual Alpine package layout first and replace the current
CXX/CC/LDFLAGS/CXXFLAGS/PATH values accordingly.

@github-actions
Copy link

✅ Preview build completed

Release: autobuild-preview-pr-139-db355762

@robobun robobun changed the title Upgrade CI to LLVM 20 (21 for Windows ARM64) Upgrade CI to LLVM 20 (21 for Windows ARM64) and Alpine 3.23 Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant