From 2f4f29ef9f2734b73ae92b51aeb16b2162d8cb6f Mon Sep 17 00:00:00 2001 From: yihau Date: Mon, 15 Jul 2024 13:59:56 +0800 Subject: [PATCH] don't use simd for solana os --- curve25519-dalek/src/backend/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curve25519-dalek/src/backend/mod.rs b/curve25519-dalek/src/backend/mod.rs index 9ad1dd3d..f23e4266 100644 --- a/curve25519-dalek/src/backend/mod.rs +++ b/curve25519-dalek/src/backend/mod.rs @@ -53,7 +53,7 @@ enum BackendKind { #[inline] fn get_selected_backend() -> BackendKind { - #[cfg(all(curve25519_dalek_backend = "simd", nightly))] + #[cfg(all(curve25519_dalek_backend = "simd", nightly, not(target_os = "solana")))] { cpufeatures::new!(cpuid_avx512, "avx512ifma", "avx512vl"); let token_avx512: cpuid_avx512::InitToken = cpuid_avx512::init(); @@ -62,7 +62,7 @@ fn get_selected_backend() -> BackendKind { } } - #[cfg(curve25519_dalek_backend = "simd")] + #[cfg(all(curve25519_dalek_backend = "simd", not(target_os = "solana")))] { cpufeatures::new!(cpuid_avx2, "avx2"); let token_avx2: cpuid_avx2::InitToken = cpuid_avx2::init();