Skip to content

Commit

Permalink
add openssl-nolink feature to avoid linking the openssl library
Browse files Browse the repository at this point in the history
This is needed to link against boringssl, but against the library
built statically by the boring-sys crate. This requires the caller to
depend on boring-sys to work, but this isn't really an issue since it
wouldn't even need this feature if that is not the case.
  • Loading branch information
vthib authored and Guiguiprim committed Jun 4, 2024
1 parent 9e7c162 commit 3822d68
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module-hash = ["yara-sys/module-hash"]
profiling = ["yara-sys/profiling"]
ndebug = ["yara-sys/ndebug"]
openssl-static = ["yara-sys/openssl-static"]
openssl-nolink = ["yara-sys/openssl-nolink"]
yara-static = ["yara-sys/yara-static"]

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions yara-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module-hash = []
profiling = []
ndebug = []
openssl-static = []
openssl-nolink = []
yara-static = []

[build-dependencies]
Expand Down
1 change: 1 addition & 0 deletions yara-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ mod build {
} else if cfg!(feature = "openssl-static") {
println!("cargo:rustc-link-lib=static=ssl");
println!("cargo:rustc-link-lib=static=crypto");
} else if cfg!(feature = "openssl-nolink") {
} else {
println!("cargo:rustc-link-lib=dylib=ssl");
println!("cargo:rustc-link-lib=dylib=crypto");
Expand Down

0 comments on commit 3822d68

Please sign in to comment.