gossip/build.rs

17 lines
485 B
Rust
Raw Normal View History

use std::process::Command;
fn main() {
let output = Command::new("git")
.args(["rev-parse", "HEAD"])
.output()
.unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={git_hash}");
2023-05-07 20:20:02 +00:00
// link to bundled libraries
#[cfg(target_os = "macos")]
2023-05-07 20:20:02 +00:00
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
#[cfg(target_os = "linux")]
2023-05-07 20:20:02 +00:00
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
}