diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-12 14:23:36 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-12 14:23:36 +0200 |
| commit | 6258b86c40b615fbba45d4e29412b6458500f5ca (patch) | |
| tree | 024b2d55074bec39d44b82c6377897bced743761 | |
| parent | 2f2d3b2fd4d38f1ea0c63eb8e880085a2ccf0987 (diff) | |
| download | rust-6258b86c40b615fbba45d4e29412b6458500f5ca.tar.gz rust-6258b86c40b615fbba45d4e29412b6458500f5ca.zip | |
Rustup to rustc 1.49.0-nightly (c71248b70 2020-10-11)
| -rw-r--r-- | rust-toolchain | 2 | ||||
| -rw-r--r-- | src/bin/cg_clif.rs | 18 | ||||
| -rw-r--r-- | src/bin/cg_clif_build_sysroot.rs | 24 |
3 files changed, 17 insertions, 27 deletions
diff --git a/rust-toolchain b/rust-toolchain index 0ffc727a751..d9e199b78ff 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-10-11 +nightly-2020-10-12 diff --git a/src/bin/cg_clif.rs b/src/bin/cg_clif.rs index b7524993ad7..590c9ef0ce1 100644 --- a/src/bin/cg_clif.rs +++ b/src/bin/cg_clif.rs @@ -74,17 +74,13 @@ fn main() { if use_jit { args.push("-Cprefer-dynamic".to_string()); } - rustc_driver::run_compiler( - &args, - &mut callbacks, - None, - None, - Some(Box::new(move |_| { - Box::new(rustc_codegen_cranelift::CraneliftCodegenBackend { - config: rustc_codegen_cranelift::BackendConfig { use_jit }, - }) - })), - ) + let mut run_compiler = rustc_driver::RunCompiler::new(&args, &mut callbacks); + run_compiler.set_make_codegen_backend(Some(Box::new(move |_| { + Box::new(rustc_codegen_cranelift::CraneliftCodegenBackend { + config: rustc_codegen_cranelift::BackendConfig { use_jit }, + }) + }))); + run_compiler.run() }); // The extra `\t` is necessary to align this label with the others. print_time_passes_entry(callbacks.time_passes, "\ttotal", start.elapsed()); diff --git a/src/bin/cg_clif_build_sysroot.rs b/src/bin/cg_clif_build_sysroot.rs index fe8bcf8b791..c207d98d6c1 100644 --- a/src/bin/cg_clif_build_sysroot.rs +++ b/src/bin/cg_clif_build_sysroot.rs @@ -92,21 +92,15 @@ fn main() { let mut callbacks = CraneliftPassesCallbacks { use_clif }; - rustc_driver::run_compiler( - &args, - &mut callbacks, - None, - None, - if use_clif { - Some(Box::new(move |_| { - Box::new(rustc_codegen_cranelift::CraneliftCodegenBackend { - config: rustc_codegen_cranelift::BackendConfig { use_jit: false }, - }) - })) - } else { - None - }, - ) + let mut run_compiler = rustc_driver::RunCompiler::new(&args, &mut callbacks); + if use_clif { + run_compiler.set_make_codegen_backend(Some(Box::new(move |_| { + Box::new(rustc_codegen_cranelift::CraneliftCodegenBackend { + config: rustc_codegen_cranelift::BackendConfig { use_jit: false }, + }) + }))); + } + run_compiler.run() }); std::process::exit(exit_code) } |
