]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #76474 - bjorn3:driver_selected_codegen, r=oli-obk
authorRalf Jung <post@ralfj.de>
Mon, 28 Sep 2020 16:39:40 +0000 (18:39 +0200)
committerGitHub <noreply@github.com>
Mon, 28 Sep 2020 16:39:40 +0000 (18:39 +0200)
Add option to pass a custom codegen backend from a driver

This allows the driver to pass information to the codegen backend. For example the headcrab debugger may in the future want to use cg_clif to JIT code to be injected in the debuggee. This would PR make it possible to tell cg_clif which symbol can be found at which address and to tell it to inject the JITed code into the right process.

This PR may also help with https://github.com/rust-lang/miri/pull/1540 by allowing miri to provide a codegen backend that only emits metadata and doesn't perform any codegen.

cc @nbaksalyar (headcrab)
cc @RalfJung (miri)


Trivial merge