File tree 1 file changed +41
-29
lines changed
library/std/src/sys/pal/unix
1 file changed +41
-29
lines changed Original file line number Diff line number Diff line change @@ -25,27 +25,36 @@ impl Drop for Handler {
25
25
}
26
26
}
27
27
28
- #[ cfg( any(
29
- target_os = "linux" ,
30
- target_os = "freebsd" ,
31
- target_os = "hurd" ,
32
- target_os = "macos" ,
33
- target_os = "netbsd" ,
34
- target_os = "openbsd" ,
35
- target_os = "solaris" ,
36
- target_os = "illumos" ,
28
+ #[ cfg( all(
29
+ not( miri) ,
30
+ any(
31
+ target_os = "linux" ,
32
+ target_os = "freebsd" ,
33
+ target_os = "hurd" ,
34
+ target_os = "macos" ,
35
+ target_os = "netbsd" ,
36
+ target_os = "openbsd" ,
37
+ target_os = "solaris" ,
38
+ target_os = "illumos" ,
39
+ ) ,
37
40
) ) ]
38
41
mod thread_info;
39
42
40
- #[ cfg( any(
41
- target_os = "linux" ,
42
- target_os = "freebsd" ,
43
- target_os = "hurd" ,
44
- target_os = "macos" ,
45
- target_os = "netbsd" ,
46
- target_os = "openbsd" ,
47
- target_os = "solaris" ,
48
- target_os = "illumos" ,
43
+ // miri doesn't model signals nor stack overflows and this code has some
44
+ // synchronization properties that we don't want to expose to user code,
45
+ // hence we disable it on miri.
46
+ #[ cfg( all(
47
+ not( miri) ,
48
+ any(
49
+ target_os = "linux" ,
50
+ target_os = "freebsd" ,
51
+ target_os = "hurd" ,
52
+ target_os = "macos" ,
53
+ target_os = "netbsd" ,
54
+ target_os = "openbsd" ,
55
+ target_os = "solaris" ,
56
+ target_os = "illumos" ,
57
+ )
49
58
) ) ]
50
59
mod imp {
51
60
use libc:: {
@@ -606,17 +615,20 @@ mod imp {
606
615
// usually have fewer qualms about forwards compatibility, since the runtime
607
616
// is shipped with the OS):
608
617
// <https://github.com/apple/swift/blob/swift-5.10-RELEASE/stdlib/public/runtime/CrashHandlerMacOS.cpp>
609
- #[ cfg( not( any(
610
- target_os = "linux" ,
611
- target_os = "freebsd" ,
612
- target_os = "hurd" ,
613
- target_os = "macos" ,
614
- target_os = "netbsd" ,
615
- target_os = "openbsd" ,
616
- target_os = "solaris" ,
617
- target_os = "illumos" ,
618
- target_os = "cygwin" ,
619
- ) ) ) ]
618
+ #[ cfg( any(
619
+ miri,
620
+ not( any(
621
+ target_os = "linux" ,
622
+ target_os = "freebsd" ,
623
+ target_os = "hurd" ,
624
+ target_os = "macos" ,
625
+ target_os = "netbsd" ,
626
+ target_os = "openbsd" ,
627
+ target_os = "solaris" ,
628
+ target_os = "illumos" ,
629
+ target_os = "cygwin" ,
630
+ ) )
631
+ ) ) ]
620
632
mod imp {
621
633
pub unsafe fn init ( ) { }
622
634
You can’t perform that action at this time.
0 commit comments