Skip to content

Commit

Permalink
add force-engine feature flag (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith3197 authored Aug 9, 2023
1 parent 557154f commit 26dc3c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ idea = []
# Enables compilation of SEED, a symmetric key block cypher mostly used in South Korea, but
# otherwise not widely supported.
seed = []
# Forces configuring Engine module support.
force-engine = []

[workspace]
members = ['testcrate']
Expand Down
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ impl Build {
}

if target.contains("musl") {
// This actually fails to compile on musl (it needs linux/version.h
// Engine module fails to compile on musl (it needs linux/version.h
// right now) but we don't actually need this most of the time.
configure.arg("no-engine");
// Disable engine module unless force-engine feature specified
if !cfg!(feature = "force-engine") {
configure.arg("no-engine");
}
} else if target.contains("windows") {
// We can build the engine feature, but the build doesn't seem
// to correctly pick up crypt32.lib functions such as
Expand Down

0 comments on commit 26dc3c8

Please sign in to comment.