Skip to content

Commit

Permalink
Fix build again for extra APIs (#58)
Browse files Browse the repository at this point in the history
The `libMLIR*` libraries still seem to need to be linked but not only
`libMLIR` even when it's a shared object.
  • Loading branch information
raviqqe authored Dec 7, 2024
1 parent 81c7786 commit 00c9eb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ on:
- main
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swatinem/rust-cache@v2
- uses: homebrew/actions/setup-homebrew@master
- run: tools/setup.sh
- run: cargo build
test:
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn run() -> Result<(), Box<dyn Error>> {

for entry in read_dir(llvm_config("--libdir")?)? {
if let Some(name) = entry?.path().file_name().and_then(OsStr::to_str) {
if name.starts_with("libMLIRCAPI") {
if name.starts_with("libMLIR") {
if let Some(name) = parse_archive_name(name) {
println!("cargo:rustc-link-lib=static={name}");
}
Expand Down

0 comments on commit 00c9eb4

Please sign in to comment.