Skip to content

Commit

Permalink
remove includes and print libs on cargo build -vv
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Nov 14, 2024
1 parent 086df91 commit 08c85df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions j9-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ fn main() -> anyhow::Result<()> {
.build();

let lib_dir = out_dir.join("lib");
let include_dir = out_dir.join("include");
if let Ok(entries) = fs::read_dir(&lib_dir) {
for entry in entries {

Check warning on line 85 in j9-sys/build.rs

View workflow job for this annotation

GitHub Actions / test

unnecessary `if let` since only the `Ok` variant of the iterator element is used

Check warning on line 85 in j9-sys/build.rs

View workflow job for this annotation

GitHub Actions / test

unnecessary `if let` since only the `Ok` variant of the iterator element is used
if let Ok(entry) = entry {
println!("lib: {}", entry.path().display());
}
}
}

println!("cargo:rustc-link-search=native={}", lib_dir.display());
println!("cargo:include={}", include_dir.display());

for lib in &["onig", "jq"] {
println!("cargo:rustc-link-lib=static={}", lib);
}
Expand Down

0 comments on commit 08c85df

Please sign in to comment.