Skip to content

Commit

Permalink
ci: update for LLVM 19
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed Feb 14, 2025
1 parent 1c1861e commit 2506d04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt install -y libpolly-17-dev
sudo ./llvm.sh 19
sudo apt install -y libpolly-19-dev
- uses: actions/checkout@v3
- name: Format
run: cargo fmt && git diff --exit-code
Expand All @@ -39,8 +39,8 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt install -y libpolly-17-dev
sudo ./llvm.sh 19
sudo apt install -y libpolly-19-dev
- uses: actions/checkout@v3
with:
submodules: recursive
Expand Down
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,24 @@ When you run that step, you *may* see an error from the `llvm-sys` crate:

```console
error: No suitable version of LLVM was found system-wide or pointed
to by LLVM_SYS_170_PREFIX.
to by LLVM_SYS_190_PREFIX.

Consider using `llvmenv` to compile an appropriate copy of LLVM, and
refer to the llvm-sys documentation for more information.

llvm-sys: https://crates.io/crates/llvm-sys
llvmenv: https://crates.io/crates/llvmenv
--> /Users/william/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-170.0.2/src/lib.rs:487:1
|
487 | / std::compile_error!(concat!(
488 | | "No suitable version of LLVM was found system-wide or pointed
489 | | to by LLVM_SYS_",
490 | | env!("CARGO_PKG_VERSION_MAJOR"),
... |
497 | | llvmenv: https://crates.io/crates/llvmenv"
498 | | ));
| |__^

error: could not compile `llvm-sys` due to previous error
```

This indicates that the build was unable to automatically find a copy of LLVM to link against.

You can fix it by setting the `LLVM_SYS_170_PREFIX`. For example, for macOS with LLVM via
You can fix it by setting the `LLVM_SYS_190_PREFIX`. For example, for macOS with LLVM via
Homebrew, you might do:

```console
LLVM_SYS_170_PREFIX=$(brew --prefix)/opt/llvm@17/ cargo install siderophile
LLVM_SYS_190_PREFIX=$(brew --prefix)/opt/llvm@19/ cargo install siderophile
```

You _may_ run into other linker errors as well, e.g.:
Expand All @@ -85,7 +75,7 @@ To tie it all together:

```console
LIBRARY_PATH=$(brew --prefix)/lib \
LLVM_SYS_170_PREFIX=$(brew --prefix)/opt/llvm@17/
LLVM_SYS_190_PREFIX=$(brew --prefix)/opt/llvm@19/
cargo install siderophile
```

Expand All @@ -103,7 +93,7 @@ cargo build
cargo install --path .
```

You may need the same `LLVM_SYS_170_PATH` and `LIBRARY_PATH` overrides
You may need the same `LLVM_SYS_190_PATH` and `LIBRARY_PATH` overrides
mentioned above.

## How to use
Expand Down

0 comments on commit 2506d04

Please sign in to comment.