From c12a30266b6631776b1959646a7a5f8deb94e0ca Mon Sep 17 00:00:00 2001 From: xvzcf Date: Tue, 1 Aug 2023 13:05:02 -0400 Subject: [PATCH] Moved cfg guard from jasmin submodules to jasmin module. --- src/jasmin.rs | 8 -------- src/lib.rs | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/jasmin.rs b/src/jasmin.rs index 3ed236d12..7a1b7d383 100644 --- a/src/jasmin.rs +++ b/src/jasmin.rs @@ -1,16 +1,8 @@ pub mod chacha20; pub mod poly1305; - -#[cfg(any(target_os = "linux", target_os = "macos"))] pub mod sha2; - -#[cfg(any(target_os = "linux", target_os = "macos"))] pub mod sha3; - -#[cfg(any(target_os = "linux", target_os = "macos"))] pub mod x25519; - -#[cfg(any(target_os = "linux", target_os = "macos"))] pub mod kyber_derand; #[cfg(test)] diff --git a/src/lib.rs b/src/lib.rs index 502cba8fb..c0f19af3a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,10 @@ pub(crate) mod hw_detection; pub use hw_detection::aes_ni_support; // Jasmin -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[cfg(all( + any(target_arch = "x86", target_arch = "x86_64"), + any(target_os = "linux", target_os = "macos") +))] pub(crate) mod jasmin; // libcrux