Skip to content

Commit

Permalink
Rustup to rustc 1.49.0-nightly (c71248b 2020-10-11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Oct 12, 2020
1 parent 2f2d3b2 commit 6258b86
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 27 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
@@ -1 +1 @@
nightly-2020-10-11
nightly-2020-10-12
18 changes: 7 additions & 11 deletions src/bin/cg_clif.rs
Expand Up @@ -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());
Expand Down
24 changes: 9 additions & 15 deletions src/bin/cg_clif_build_sysroot.rs
Expand Up @@ -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)
}

0 comments on commit 6258b86

Please sign in to comment.