Skip to content

feat(build): centralize LLVM_VERSION #142786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ci/docker/scripts/build-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -ex

source versions.sh
source shared.sh

# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh
LLVM=llvmorg-20.1.0-rc2
# Should be in sync with src/ci/scripts/install-clang.sh
LLVM=llvmorg-$LLVM_VERSION

mkdir llvm-project
cd llvm-project
Expand Down
7 changes: 7 additions & 0 deletions src/ci/docker/scripts/versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# ignore-tidy-linelength

# To keep docker / non-docker builds in sync

# renovate: datasource=github-releases depName=llvm/llvm-project versioning=semver-coerced extractVersion=^llvmorg-(?<version>\d+\.\d+\.\d+(?:.*))
Copy link
Member

@bjorn3 bjorn3 Jun 20, 2025

Choose a reason for hiding this comment

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

This should not be automatically updated I think. LLVM updates are more risky than regular dependency updates and frequently need changes on the rust side.

Copy link
Author

Choose a reason for hiding this comment

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

renovate doesn't merge automatically, maintainers would still have to do that manually like for dependabot.

For what it's worth, you saw that I didn't enable the regex customManager for these lines in renovate.json5...

export LLVM_VERSION=20.1.3
Copy link
Member

Choose a reason for hiding this comment

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

Maybe put this in shared.sh instead?

Copy link
Author

Choose a reason for hiding this comment

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

Would be possible of course.

I didn't know if all those functions would be unwanted in the non-docker builds, that's why I separated the shared versions from shared functions...

5 changes: 2 additions & 3 deletions src/ci/scripts/install-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
set -euo pipefail
IFS=$'\n\t'

# LLVM_VERSION should be in sync with src/ci/docker/scripts/build-clang.sh
source "$(cd "$(dirname "$0")" && pwd)/../docker/scripts/versions.sh"
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

# Update both macOS's and Windows's tarballs when bumping the version here.
# Try to keep this in sync with src/ci/docker/scripts/build-clang.sh
LLVM_VERSION="20.1.3"

if isMacOS; then
# FIXME: This is the latest pre-built version of LLVM that's available for
# x86_64 MacOS. We may want to consider building our own LLVM binaries
Expand Down
Loading