Skip to content

Commit dd7d933

Browse files
committed
chore: Update to LLVM 19
Latest Rust nightly switched to LLVM 19, so we need to update in order to support rustc-llvm-proxy. LLVM 19 packages don't provide shared libraries anymore, so from now on, we use the `llvm-sys/force-dynamic` feaure only for LLVM built from source.
1 parent 7585ff7 commit dd7d933

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,9 @@ jobs:
5555
rust:
5656
- stable
5757
- beta
58-
# TODO: unpin nightly. There was a regression in
59-
# https://github.com/rust-lang/rust/compare/1cec373f6...becebb315 that causes
60-
# tests/btf/assembly/anon_struct_c.rs to fail to link.
61-
- nightly-2024-04-16
58+
- nightly
6259
llvm:
63-
- 18
60+
- 19
6461
- source
6562
name: rustc=${{ matrix.rust }} llvm=${{ matrix.llvm }}
6663
needs: llvm
@@ -121,7 +118,7 @@ jobs:
121118
echo -e deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm }} main | sudo tee /etc/apt/sources.list.d/llvm.list
122119
123120
sudo apt update
124-
sudo apt -y install llvm-${{ matrix.llvm }}-dev
121+
sudo apt -y install llvm-${{ matrix.llvm }}-dev libpolly-${{ matrix.llvm }}-dev
125122
echo /usr/lib/llvm-${{ matrix.llvm }}/bin >> $GITHUB_PATH
126123
127124
- name: Restore LLVM
@@ -152,14 +149,14 @@ jobs:
152149
- uses: taiki-e/install-action@cargo-hack
153150

154151
- name: Check
155-
run: cargo hack check --feature-powerset --features llvm-sys/force-dynamic
152+
run: cargo hack check --feature-powerset
156153

157154
- name: Build
158-
run: cargo hack build --feature-powerset --features llvm-sys/force-dynamic
155+
run: cargo hack build --feature-powerset
159156

160157
- name: Test
161158
if: matrix.rust == 'nightly'
162-
run: cargo hack test --feature-powerset --features llvm-sys/force-dynamic
159+
run: cargo hack test --feature-powerset
163160

164161
- uses: actions/checkout@v4
165162
if: matrix.rust == 'nightly'
@@ -170,7 +167,7 @@ jobs:
170167

171168
- name: Install
172169
if: matrix.rust == 'nightly'
173-
run: cargo install --path . --no-default-features --features llvm-sys/force-dynamic
170+
run: cargo install --path . --no-default-features
174171

175172
# TODO: Remove this and run the integration tests on the local machine when they pass on 5.15.
176173
- name: Download debian kernels

.github/workflows/llvm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- id: ls-remote
1717
run: |
1818
set -euxo pipefail
19-
value=$(git ls-remote https://github.com/aya-rs/llvm-project.git refs/heads/rustc/18.0-2024-02-13 | cut -f1)
19+
value=$(git ls-remote https://github.com/aya-rs/llvm-project.git refs/heads/rustc/19.1-2024-07-30 | cut -f1)
2020
echo "sha=$value" >> "$GITHUB_OUTPUT"
2121
2222
- id: cache-key

Cargo.lock

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ar = { version = "0.9.0" }
2828
aya-rustc-llvm-proxy = { version = "0.9.2", optional = true }
2929
gimli = { version = "0.31.0" }
3030
libc = { version = "0.2.155" }
31-
llvm-sys = { features = ["disable-alltargets-init"], version = "180.0.0-rc2" }
31+
llvm-sys = { features = ["disable-alltargets-init"], version = "191.0.0-rc1" }
3232
log = { version = "0.4.22" }
3333
thiserror = { version = "1.0.63" }
3434
tracing = "0.1"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ files with embedded bitcode (.o), optionally stored inside ar archives (.a).
1717

1818
## Installation
1919

20-
The linker requires LLVM 18. It can use the same LLVM used by the rust compiler,
20+
The linker requires LLVM 19. It can use the same LLVM used by the rust compiler,
2121
or it can use an external LLVM installation.
2222

2323
If your target is `aarch64-unknown-linux-gnu` (i.e. Linux on Apple Silicon) you
@@ -33,14 +33,14 @@ cargo install bpf-linker
3333

3434
### Using external LLVM
3535

36-
On Debian based distributions you need to install the `llvm-18-dev`, `libclang-18-dev`
37-
and `libpolly-18-dev` packages. If your distro doesn't have them you can get them
36+
On Debian based distributions you need to install the `llvm-19-dev`, `libclang-19-dev`
37+
and `libpolly-19-dev` packages. If your distro doesn't have them you can get them
3838
from the official LLVM repo at https://apt.llvm.org.
3939

4040
On rpm based distribution you need the `llvm-devel` and `clang-devel` packages.
4141
If your distro doesn't have them you can get them from Fedora Rawhide.
4242

43-
Once you have installed LLVM 18 you can install the linker running:
43+
Once you have installed LLVM 19 you can install the linker running:
4444

4545
```sh
4646
cargo install bpf-linker --no-default-features

0 commit comments

Comments
 (0)