File tree Expand file tree Collapse file tree 3 files changed +17
-27
lines changed Expand file tree Collapse file tree 3 files changed +17
-27
lines changed Original file line number Diff line number Diff line change 1- nightly-2020-10-11
1+ nightly-2020-10-12
Original file line number Diff line number Diff line change @@ -74,17 +74,13 @@ fn main() {
7474 if use_jit {
7575 args. push ( "-Cprefer-dynamic" . to_string ( ) ) ;
7676 }
77- rustc_driver:: run_compiler (
78- & args,
79- & mut callbacks,
80- None ,
81- None ,
82- Some ( Box :: new ( move |_| {
83- Box :: new ( rustc_codegen_cranelift:: CraneliftCodegenBackend {
84- config : rustc_codegen_cranelift:: BackendConfig { use_jit } ,
85- } )
86- } ) ) ,
87- )
77+ let mut run_compiler = rustc_driver:: RunCompiler :: new ( & args, & mut callbacks) ;
78+ run_compiler. set_make_codegen_backend ( Some ( Box :: new ( move |_| {
79+ Box :: new ( rustc_codegen_cranelift:: CraneliftCodegenBackend {
80+ config : rustc_codegen_cranelift:: BackendConfig { use_jit } ,
81+ } )
82+ } ) ) ) ;
83+ run_compiler. run ( )
8884 } ) ;
8985 // The extra `\t` is necessary to align this label with the others.
9086 print_time_passes_entry ( callbacks. time_passes , "\t total" , start. elapsed ( ) ) ;
Original file line number Diff line number Diff line change @@ -92,21 +92,15 @@ fn main() {
9292
9393 let mut callbacks = CraneliftPassesCallbacks { use_clif } ;
9494
95- rustc_driver:: run_compiler (
96- & args,
97- & mut callbacks,
98- None ,
99- None ,
100- if use_clif {
101- Some ( Box :: new ( move |_| {
102- Box :: new ( rustc_codegen_cranelift:: CraneliftCodegenBackend {
103- config : rustc_codegen_cranelift:: BackendConfig { use_jit : false } ,
104- } )
105- } ) )
106- } else {
107- None
108- } ,
109- )
95+ let mut run_compiler = rustc_driver:: RunCompiler :: new ( & args, & mut callbacks) ;
96+ if use_clif {
97+ run_compiler. set_make_codegen_backend ( Some ( Box :: new ( move |_| {
98+ Box :: new ( rustc_codegen_cranelift:: CraneliftCodegenBackend {
99+ config : rustc_codegen_cranelift:: BackendConfig { use_jit : false } ,
100+ } )
101+ } ) ) ) ;
102+ }
103+ run_compiler. run ( )
110104 } ) ;
111105 std:: process:: exit ( exit_code)
112106}
You can’t perform that action at this time.
0 commit comments