Skip to content

Commit

Permalink
Fixes incorrect library name for zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Oct 7, 2023
1 parent 9274f21 commit 6e4318b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions stage0/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ fn main() {
println!("cargo:rustc-link-lib=LLVMDemangle");

// Link zstd.
let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
let zstd = std::env::var("ZSTD_PREFIX").unwrap();

println!("cargo:rustc-link-search={}/lib", zstd);
println!("cargo:rustc-link-lib=zstd");

if os == "windows" {
println!("cargo:rustc-link-lib=zstd_static");
} else {
println!("cargo:rustc-link-lib=zstd");
}

// Link C++.
match std::env::var("CARGO_CFG_TARGET_OS").unwrap().as_str() {
match os.as_str() {
"linux" => {
let profile = std::env::var("PROFILE").unwrap();

Expand Down

0 comments on commit 6e4318b

Please sign in to comment.