Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const ASM_TARGETS: &[AsmTarget] = &[
perlasm_format: WIN32N,
},
AsmTarget {
oss: &[WINDOWS],
oss: &[WINDOWS, CYGWIN],
arch: X86_64,
perlasm_format: NASM,
},
Expand Down Expand Up @@ -253,6 +253,7 @@ const NASM: &str = "nasm";
const APPLE_ABI: &[&str] = &["ios", "macos", "tvos", "visionos", "watchos"];

const WINDOWS: &str = "windows";
const CYGWIN: &str = "cygwin";

pub fn generate_sources_and_preassemble<'a>(
tools: &Tools,
Expand Down Expand Up @@ -344,7 +345,7 @@ pub fn build_c_code(
// them.
if extension == "S"
&& (target.arch == X86_64 || target.arch == X86)
&& target.os == WINDOWS
&& (target.os == WINDOWS || target.os == CYGWIN)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ec/curve25519/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub struct P3 {
impl P3 {
// Returns the result of multiplying the base point by the scalar in constant time.
pub(super) fn from_scalarmult_base(scalar: &Scalar, cpu: cpu::Features) -> Self {
#[cfg(all(target_arch = "x86_64", not(windows)))]
#[cfg(all(target_arch = "x86_64", not(windows), not(target_os = "cygwin")))]
if let Some(cpu) = super::adx::get_features(cpu) {
return super::adx::scalarmult_base(scalar, cpu);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ec/curve25519/x25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn x25519_ecdh(
return x25519_neon(out, scalar, point, cpu);
}

#[cfg(all(target_arch = "x86_64", not(windows)))]
#[cfg(all(target_arch = "x86_64", not(windows), not(target_os = "cygwin")))]
if super::adx::get_features(cpu).is_some() {
prefixed_extern! {
unsafe fn x25519_scalar_mult_adx(
Expand Down
1 change: 1 addition & 0 deletions src/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ impl SystemRandom {
all(feature = "less-safe-getrandom-espidf", target_os = "espidf"),
target_os = "aix",
target_os = "android",
target_os = "cygwin",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
Expand Down
Loading