@@ -5,7 +5,7 @@ use std::{alloc, slice};
55use rustc_abi:: { Align , Size } ;
66use rustc_middle:: mir:: interpret:: AllocBytes ;
77
8- #[ cfg( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
8+ #[ cfg( target_os = "linux" ) ]
99use crate :: discrete_alloc:: MachineAlloc ;
1010use crate :: helpers:: ToU64 as _;
1111
@@ -42,9 +42,9 @@ impl Drop for MiriAllocBytes {
4242
4343 // SAFETY: Invariant, `self.ptr` points to memory allocated with `self.layout`.
4444 unsafe {
45- #[ cfg( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
45+ #[ cfg( target_os = "linux" ) ]
4646 MachineAlloc :: dealloc ( self . ptr , alloc_layout) ;
47- #[ cfg( not( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
47+ #[ cfg( not( target_os = "linux" ) ) ]
4848 alloc:: dealloc ( self . ptr , alloc_layout) ;
4949 }
5050 }
@@ -100,11 +100,11 @@ impl AllocBytes for MiriAllocBytes {
100100 let align = align. bytes ( ) ;
101101 // SAFETY: `alloc_fn` will only be used with `size != 0`.
102102 let alloc_fn = |layout| unsafe {
103- #[ cfg( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
103+ #[ cfg( target_os = "linux" ) ]
104104 {
105105 MachineAlloc :: alloc ( layout)
106106 }
107- #[ cfg( not( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
107+ #[ cfg( not( target_os = "linux" ) ) ]
108108 {
109109 alloc:: alloc ( layout)
110110 }
@@ -124,11 +124,11 @@ impl AllocBytes for MiriAllocBytes {
124124 let align = align. bytes ( ) ;
125125 // SAFETY: `alloc_fn` will only be used with `size != 0`.
126126 let alloc_fn = |layout| unsafe {
127- #[ cfg( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
127+ #[ cfg( target_os = "linux" ) ]
128128 {
129129 MachineAlloc :: alloc_zeroed ( layout)
130130 }
131- #[ cfg( not( all ( unix , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
131+ #[ cfg( not( target_os = "linux" ) ) ]
132132 {
133133 alloc:: alloc_zeroed ( layout)
134134 }
0 commit comments