Skip to content

Commit

Permalink
chore: link libm on posix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jun 18, 2024
1 parent 5a44c59 commit 1c95788
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bindings/c/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ use std::path::PathBuf;
const DIR_FOR_HEADER: &str = "build";

fn main() {
// linker flags
// Link libm on Unix-like systems (needed due to use of num_cpus crate)
#[cfg(not(target_os = "windows"))]
println!("cargo:rustc-link-lib=m");

println!("cargo:rerun-if-changed=src/");
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let package_name = env::var("CARGO_PKG_NAME").unwrap();
Expand Down

0 comments on commit 1c95788

Please sign in to comment.