Don't require a C++ compiler for -musl targets.
Also, don't build/run `bn_tests` unless RSA signing is enabled, since the functionality that `bn_tests` tests is RSA-signing-specific.
This commit is contained in:
parent
a004549b97
commit
f674a7e945
@ -287,10 +287,11 @@ rayon = "0.6"
|
||||
default = ["use_heap", "dev_urandom_fallback"]
|
||||
dev_urandom_fallback = []
|
||||
internal_benches = []
|
||||
rsa_signing = []
|
||||
rsa_signing = ["bn_tests"]
|
||||
slow_tests = []
|
||||
test_logging = []
|
||||
use_heap = []
|
||||
bn_tests = []
|
||||
|
||||
# XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122
|
||||
|
||||
|
12
build.rs
12
build.rs
@ -482,9 +482,13 @@ fn build_c_code(target: &Target, out_dir: &Path) {
|
||||
|
||||
let test_srcs = RING_TEST_SRCS.iter()
|
||||
.map(PathBuf::from)
|
||||
// Avoid the libstdc++ vs libc++ issue for macOS/iOS by just avoiding
|
||||
// all the C++-based tests.
|
||||
.filter(|p| !(target.os() == "macos" || target.os == "ios") ||
|
||||
// Allow the C++-based tests to be disabled
|
||||
.filter(|p| cfg!(feature = "bn_tests") ||
|
||||
p.extension().unwrap().to_str().unwrap() != "cc")
|
||||
// Avoid the libstdc++ vs libc++ issue for macOS/iOS, and g++ issue on
|
||||
// musl by just avoiding all the C++-based tests.
|
||||
.filter(|p| !(target.os() == "macos" || target.os == "ios" ||
|
||||
target.env() == "musl") ||
|
||||
p.extension().unwrap().to_str().unwrap() != "cc")
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@ -502,6 +506,8 @@ fn build_c_code(target: &Target, out_dir: &Path) {
|
||||
includes_modified));
|
||||
|
||||
if target.env() != "msvc" &&
|
||||
target.env() != "musl" &&
|
||||
cfg!(feature = "bn_tests") &&
|
||||
!(target.os() == "macos" || target.os() == "ios") {
|
||||
let libcxx = if use_libcxx(target) {
|
||||
"c++"
|
||||
|
@ -189,7 +189,8 @@ mod private {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[cfg(all(feature = "use_heap",
|
||||
not(any(target_os = "macos", target_os = "ios"))))]
|
||||
feature = "bn_tests",
|
||||
not(any(target_os = "macos", target_os = "ios", target_env = "musl"))))]
|
||||
bssl_test!(test_bn, bssl_bn_test_main);
|
||||
|
||||
bssl_test!(test_constant_time, bssl_constant_time_test_main);
|
||||
|
Loading…
x
Reference in New Issue
Block a user