File tree 1 file changed +9
-2
lines changed
library/std/src/sys/common
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ use crate::ptr;
14
14
target_arch = "asmjs" ,
15
15
target_arch = "wasm32" ,
16
16
target_arch = "hexagon" ,
17
- target_arch = "riscv32" ,
18
- target_arch = "xtensa"
17
+ all ( target_arch = "riscv32" , not ( target_os = "espidf" ) ) ,
18
+ all ( target_arch = "xtensa" , not ( target_os = "espidf" ) ) ,
19
19
) ) ) ]
20
20
pub const MIN_ALIGN : usize = 8 ;
21
21
#[ cfg( all( any(
@@ -28,6 +28,13 @@ pub const MIN_ALIGN: usize = 8;
28
28
target_arch = "wasm64" ,
29
29
) ) ) ]
30
30
pub const MIN_ALIGN : usize = 16 ;
31
+ // By default, the allocator on the esp-idf platform guarentees no specific alignment.
32
+ // This can be changed, but not though libc API's so we set the MIN_ALIGN here to 1.
33
+ #[ cfg( all( any(
34
+ all( target_arch = "riscv32" , target_os = "espidf" ) ,
35
+ all( target_arch = "xtensa" , target_os = "espidf" ) ,
36
+ ) ) ) ]
37
+ pub const MIN_ALIGN : usize = 1 ;
31
38
32
39
pub unsafe fn realloc_fallback (
33
40
alloc : & System ,
You can’t perform that action at this time.
0 commit comments