Skip to content

Commit 6258b86

Browse files
committed
Rustup to rustc 1.49.0-nightly (c71248b70 2020-10-11)
1 parent 2f2d3b2 commit 6258b86

File tree

3 files changed

+17
-27
lines changed

3 files changed

+17
-27
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2020-10-11
1+
nightly-2020-10-12

src/bin/cg_clif.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff 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, "\ttotal", start.elapsed());

src/bin/cg_clif_build_sysroot.rs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)