@@ -269,6 +269,7 @@ pub(crate) fn select_performance_tier(capabilities: &ArchCapabilities) -> Perfor
269269
270270/// Enum that holds the different ArchOps implementations for compile-time dispatch
271271/// This avoids the need for trait objects while still providing factory-based selection
272+ #[ cfg( any( target_arch = "aarch64" , target_arch = "x86" , target_arch = "x86_64" ) ) ]
272273#[ derive( Debug , Clone , Copy ) ]
273274pub enum ArchOpsInstance {
274275 #[ cfg( target_arch = "aarch64" ) ]
@@ -285,6 +286,7 @@ pub enum ArchOpsInstance {
285286 SoftwareFallback ,
286287}
287288
289+ #[ cfg( any( target_arch = "aarch64" , target_arch = "x86" , target_arch = "x86_64" ) ) ]
288290impl ArchOpsInstance {
289291 #[ inline( always) ]
290292 pub fn get_tier ( & self ) -> PerformanceTier {
@@ -304,7 +306,10 @@ impl ArchOpsInstance {
304306 }
305307
306308 /// Get a human-readable target string describing the active configuration
307- #[ cfg( feature = "alloc" ) ]
309+ #[ cfg( all(
310+ feature = "alloc" ,
311+ any( target_arch = "aarch64" , target_arch = "x86" , target_arch = "x86_64" )
312+ ) ) ]
308313 #[ inline( always) ]
309314 pub fn get_target_string ( & self ) -> String {
310315 tier_to_target_string ( self . get_tier ( ) )
@@ -346,6 +351,7 @@ fn create_arch_ops() -> ArchOpsInstance {
346351}
347352
348353/// Helper function to create ArchOpsInstance from a performance tier
354+ #[ cfg( any( target_arch = "aarch64" , target_arch = "x86" , target_arch = "x86_64" ) ) ]
349355fn create_arch_ops_from_tier ( tier : PerformanceTier ) -> ArchOpsInstance {
350356 match tier {
351357 #[ cfg( target_arch = "aarch64" ) ]
0 commit comments