Skip to content

Commit 26dc3c8

Browse files
authored
add force-engine feature flag (#205)
1 parent 557154f commit 26dc3c8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ idea = []
4040
# Enables compilation of SEED, a symmetric key block cypher mostly used in South Korea, but
4141
# otherwise not widely supported.
4242
seed = []
43+
# Forces configuring Engine module support.
44+
force-engine = []
4345

4446
[workspace]
4547
members = ['testcrate']

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,12 @@ impl Build {
196196
}
197197

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

0 commit comments

Comments
 (0)