Open nspin opened 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.30%. Comparing base (
7bc7672
) to head (e949d34
).:exclamation: Current head e949d34 differs from pull request most recent head 0e644b7. Consider uploading reports for the commit 0e644b7 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
build.rs
determines whether the target platform is supported by PerlAsm using bothtarget_arch
andtarget_os
. Instances of conditional compilation in bothsrc/
andcrypto/
were using justtarget_arch
to determine whether PerlAsm symbols are present, resulting in link-time build failures for certain targets, including, for example,aarch64-unknown-none
.This commit fixes those instances of conditional compilation to align with the build script.
I've made the most conservative possible modifications to these
cfg
conditions, so some of them may contain redundancy. In particular, those that wereany(target_arch = "aarch64", target_arch = "arm", target_arch = "x86_64", target_arch = "x86")
are nowall(have_perlasm, any(target_arch = "aarch64", target_arch = "arm", target_arch = "x86_64", target_arch = "x86"))
, but it may be the case that some of these ought to just behave_perlasm
.This PR addresses https://github.com/briansmith/ring/issues/1793. As discussed in that issue, the conditions in
build.rs
for PerlAsm support may be overly conservative, but expanding the set of targets which are deemed to be supported by PerlAsm will be trickier. This PR is just a bug fix that enables platforms such asaarch64-unknown-none
to use the fallbacks rather than failing to build at link-time.