From 0852c734f48d38f0614b776d51db334d15b37e78 Mon Sep 17 00:00:00 2001 From: Jan Baudisch Date: Sun, 8 Dec 2024 19:34:28 +0100 Subject: [PATCH] feat(build): link gmp dynamically --- d4-oxide/build.rs | 6 ++++-- flake.nix | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/d4-oxide/build.rs b/d4-oxide/build.rs index eb01008..f1b6c8a 100644 --- a/d4-oxide/build.rs +++ b/d4-oxide/build.rs @@ -60,8 +60,10 @@ fn main() { println!("cargo::rustc-link-lib=static=cadical"); println!("cargo::rustc-link-lib=static=cryptominisat5"); println!("cargo::rustc-link-lib=static=glucose"); - println!("cargo::rustc-link-lib=static=gmp"); - println!("cargo::rustc-link-lib=static=gmpxx"); println!("cargo::rustc-link-lib=static=gpmc"); println!("cargo::rustc-link-lib=static=sbva"); + + // Link GMP dynamically for now as it is also needed for Mt-KaHyPar. + println!("cargo::rustc-link-lib=dylib=gmpxx"); + println!("cargo::rustc-link-lib=dylib=gmp"); } diff --git a/flake.nix b/flake.nix index 3532058..fc61cce 100644 --- a/flake.nix +++ b/flake.nix @@ -38,8 +38,8 @@ buildInputs = [ pkgs.boost.dev + pkgs.gmp.dev pkgs.pkgsStatic.mpfr.dev - pkgs.pkgsStatic.gmp.dev d4Pkgs.mt-kahypar.dev ]; };