Skip to content

Commit

Permalink
Fix linking against C++ runtime library on Windows, macOS (#11603)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Sep 14, 2024
1 parent 44aa486 commit 132b6b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rust/cryptography-openssl/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ fn main() {

if env::var("DEP_OPENSSL_BORINGSSL").is_ok() {
println!("cargo:rustc-cfg=CRYPTOGRAPHY_IS_BORINGSSL");
println!("cargo:rustc-link-lib=stdc++");
if env::var_os("CARGO_CFG_UNIX").is_some() {
match env::var("CARGO_CFG_TARGET_OS").as_deref() {
Ok("macos") => println!("cargo:rustc-link-lib=c++"),
_ => println!("cargo:rustc-link-lib=stdc++"),
}
}
}
}

0 comments on commit 132b6b3

Please sign in to comment.