Skip to content

Commit 53c74a0

Browse files
committed
fix(build): link with -latomic when using vendored OpenSSL
1 parent 967799f commit 53c74a0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ fn main() {
2828
let target = env::var("TARGET").unwrap();
2929
println!("cargo:rustc-env=TARGET={target}");
3030

31+
// Link with `-latomic` when using vendored OpenSSL.
32+
// https://github.com/openssl/openssl/issues/14083
33+
// https://github.com/rusqlite/rusqlite/pull/1037/commits/3f8195a90f55ac7ac7b2ab3f098cdb4588fb7604
34+
if cfg!(feature = "vendored-openssl") {
35+
println!("cargo:rustc-link-lib=dylib=atomic");
36+
}
37+
3138
// Set linker options specific to Windows MSVC.
3239
let target_os = env::var("CARGO_CFG_TARGET_OS");
3340
let target_env = env::var("CARGO_CFG_TARGET_ENV");

0 commit comments

Comments
 (0)