File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,19 @@ pub mod thread;
8
8
mod vector_clock;
9
9
pub mod weak_memory;
10
10
11
+ // cfg(bootstrap)
12
+ macro_rules! cfg_select_dispatch {
13
+ ( $( $tokens: tt) * ) => {
14
+ #[ cfg( bootstrap) ]
15
+ cfg_match! { $( $tokens) * }
16
+
17
+ #[ cfg( not( bootstrap) ) ]
18
+ cfg_select! { $( $tokens) * }
19
+ } ;
20
+ }
21
+
11
22
// Import either the real genmc adapter or a dummy module.
12
- cfg_select ! {
23
+ cfg_select_dispatch ! {
13
24
feature = "genmc" => {
14
25
mod genmc;
15
26
pub use self :: genmc:: { GenmcCtx , GenmcConfig } ;
Original file line number Diff line number Diff line change
1
+ #![ cfg_attr( bootstrap, feature( cfg_match) ) ]
2
+ #![ cfg_attr( not( bootstrap) , feature( cfg_select) ) ]
1
3
#![ feature( rustc_private) ]
2
- #![ feature( cfg_select) ]
3
4
#![ feature( float_gamma) ]
4
5
#![ feature( float_erf) ]
5
6
#![ feature( map_try_insert) ]
Original file line number Diff line number Diff line change @@ -89,8 +89,19 @@ impl UnixFileDescription for FileHandle {
89
89
communicate_allowed : bool ,
90
90
op : FlockOp ,
91
91
) -> InterpResult < ' tcx , io:: Result < ( ) > > {
92
+ // cfg(bootstrap)
93
+ macro_rules! cfg_select_dispatch {
94
+ ( $( $tokens: tt) * ) => {
95
+ #[ cfg( bootstrap) ]
96
+ cfg_match! { $( $tokens) * }
97
+
98
+ #[ cfg( not( bootstrap) ) ]
99
+ cfg_select! { $( $tokens) * }
100
+ } ;
101
+ }
102
+
92
103
assert ! ( communicate_allowed, "isolation should have prevented even opening a file" ) ;
93
- cfg_select ! {
104
+ cfg_select_dispatch ! {
94
105
all( target_family = "unix" , not( target_os = "solaris" ) ) => {
95
106
use std:: os:: fd:: AsRawFd ;
96
107
You can’t perform that action at this time.
0 commit comments