-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to pass a custom codegen backend from a driver #76474
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
fbd8ca8
to
be040dc
Compare
This comment has been minimized.
This comment has been minimized.
be040dc
to
1745328
Compare
Rebased |
1745328
to
79a086e
Compare
79a086e
to
71bc62b
Compare
This comment has been minimized.
This comment has been minimized.
FWIW, I had not realized how hard it is to write a stub codegen backend that does nothing, so using this in Miri will be tricky -- this is just the first step. But it seems like a reasonable first step to me anyway. Not sure who would be a good reviewer though... I'll bring this up on Zulip. |
r? @oli-obk |
@bors r+ |
📌 Commit 71bc62b has been approved by |
@bors rollup |
…li-obk 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 rust-lang/miri#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)
…li-obk 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 rust-lang/miri#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)
Rollup of 7 pull requests Successful merges: - rust-lang#76454 (UI to unit test for those using Cell/RefCell/UnsafeCell) - rust-lang#76474 (Add option to pass a custom codegen backend from a driver) - rust-lang#76711 (diag: improve closure/generic parameter mismatch) - rust-lang#77170 (Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]`) - rust-lang#77194 (Add doc alias for iterator fold) - rust-lang#77288 (fix building libstd for Miri on macOS) - rust-lang#77295 (Update unstable-book: Fix ABNF in inline assembly docs) Failed merges: r? `@ghost`
…li-obk 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 rust-lang/miri#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)
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 rust-lang/miri#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)