Skip to content

Commit

Permalink
193 fix macos installation from crates (#194)
Browse files Browse the repository at this point in the history
* remove build instructions from cargo toml

* added mac specific linker args to build.rs

* bump version
  • Loading branch information
noamteyssier authored Jul 24, 2023
1 parent 6ea93f1 commit 2528bf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
14 changes: 1 addition & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ggetrs"
version = "0.1.76"
version = "0.1.77"
edition = "2021"
license = "MIT"
description = "Efficient querying of biological databases from the command line"
Expand Down Expand Up @@ -35,15 +35,3 @@ serde = { version = "1.0.144", features = ["derive"] }
serde-xml-rs = "0.6.0"
serde_json = "1.0.85"
tokio = { version = "1.21.0", features = ["full"] }

# Build instructions of MacOS
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
9 changes: 9 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::env;

fn main() {
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os == "macos" {
println!("cargo:rustc-link-arg=-undefined");
println!("cargo:rustc-link-arg=dynamic_lookup");
}
}

0 comments on commit 2528bf0

Please sign in to comment.