From ab39c6b2c92c99b3b5bedb09a753e904e2a36af4 Mon Sep 17 00:00:00 2001 From: Agost Biro Date: Wed, 5 Jun 2024 21:37:29 +0200 Subject: [PATCH] Add gmp lib search path for ARM MacOS --- crates/vdf/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/vdf/build.rs b/crates/vdf/build.rs index 6b576a6..0fc1d3e 100644 --- a/crates/vdf/build.rs +++ b/crates/vdf/build.rs @@ -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");