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