File tree Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 1- 337c11e5932275e7d450c1f2e26f289f0ddfa717
1+ 99426c570eebec8dcba2eaa8f5057265346aaedc
Original file line number Diff line number Diff line change @@ -8,8 +8,19 @@ pub mod thread;
88mod vector_clock;
99pub mod weak_memory;
1010
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+
1122// Import either the real genmc adapter or a dummy module.
12- cfg_select ! {
23+ cfg_select_dispatch ! {
1324 feature = "genmc" => {
1425 mod genmc;
1526 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) ) ]
13#![ feature( rustc_private) ]
2- #![ feature( cfg_select) ]
34#![ feature( float_gamma) ]
45#![ feature( float_erf) ]
56#![ feature( map_try_insert) ]
Original file line number Diff line number Diff line change @@ -89,8 +89,19 @@ impl UnixFileDescription for FileHandle {
8989 communicate_allowed : bool ,
9090 op : FlockOp ,
9191 ) -> 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+
92103 assert ! ( communicate_allowed, "isolation should have prevented even opening a file" ) ;
93- cfg_select ! {
104+ cfg_select_dispatch ! {
94105 all( target_family = "unix" , not( target_os = "solaris" ) ) => {
95106 use std:: os:: fd:: AsRawFd ;
96107
You can’t perform that action at this time.
0 commit comments