Skip to content

Commit

Permalink
fix(build): link with -latomic when using vendored OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Feb 11, 2024
1 parent 967799f commit 53c74a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ fn main() {
let target = env::var("TARGET").unwrap();
println!("cargo:rustc-env=TARGET={target}");

// Link with `-latomic` when using vendored OpenSSL.
// https://github.com/openssl/openssl/issues/14083
// https://github.com/rusqlite/rusqlite/pull/1037/commits/3f8195a90f55ac7ac7b2ab3f098cdb4588fb7604
if cfg!(feature = "vendored-openssl") {
println!("cargo:rustc-link-lib=dylib=atomic");
}

// Set linker options specific to Windows MSVC.
let target_os = env::var("CARGO_CFG_TARGET_OS");
let target_env = env::var("CARGO_CFG_TARGET_ENV");
Expand Down

0 comments on commit 53c74a0

Please sign in to comment.