File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::cell::RefCell;
8
8
use std:: collections:: BTreeMap ;
9
9
use std:: collections:: BTreeSet ;
10
10
use std:: env;
11
- use std:: io:: Read ;
11
+ use std:: io:: { Read , Write } ;
12
12
use std:: panic:: AssertUnwindSafe ;
13
13
use std:: path:: { PathBuf , Path } ;
14
14
use std:: process:: Command ;
@@ -266,10 +266,11 @@ fn main() {
266
266
267
267
let output = generate ( relevant) ;
268
268
let mut file = std:: fs:: File :: create ( out_path. join ( "entries.rs" ) ) . unwrap ( ) ;
269
+ writeln ! ( file, "jit_entries!{{" ) . unwrap ( ) ;
269
270
for line in output {
270
- use std:: io:: Write ;
271
- writeln ! ( file, "{}" , line) . unwrap ( ) ;
271
+ writeln ! ( file, " {}" , line) . unwrap ( ) ;
272
272
}
273
+ writeln ! ( file, "}}" ) . unwrap ( ) ;
273
274
274
275
// Write the bindings to the $OUT_DIR/bindings.rs file.
275
276
bindings
Original file line number Diff line number Diff line change @@ -277,5 +277,9 @@ macro_rules! jit_entry {
277
277
} ;
278
278
}
279
279
280
+ macro_rules! jit_entries {
281
+ ( $( $tokens: tt ) * ) => { $( $tokens ) * } ;
282
+ }
283
+
280
284
include ! ( concat!( env!( "OUT_DIR" ) , "/entries.rs" ) ) ;
281
285
You can’t perform that action at this time.
0 commit comments