Add gmp lib search path for ARM MacOS

This commit is contained in:
Agost Biro 2024-06-05 21:37:29 +02:00
parent 7a29f65100
commit ab39c6b2c9
No known key found for this signature in database

View File

@ -104,6 +104,12 @@ fn generate(f: &mut dyn Write) {
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let target = env::var("TARGET").expect("cargo should have set this");
if target == "aarch64-apple-darwin" {
println!("cargo:rustc-link-search=/opt/homebrew/Cellar/gmp/6.3.0/lib");
}
let manifest_path = env::var("OUT_DIR").expect("cargo should have set this");
let mut path = PathBuf::from(&manifest_path);
path.push("constants.rs");