diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-06-30 18:44:11 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-07-01 11:00:49 +0000 |
| commit | bd2ff518cefe1dc9e1dcd328319eead618eed67a (patch) | |
| tree | 8fc97ce9b86546600f4752a97a396abcedf988e2 /compiler/rustc_driver_impl/src/lib.rs | |
| parent | 8127461b0ed54dea8ca9cf430b1d231611e1b477 (diff) | |
| download | rust-bd2ff518cefe1dc9e1dcd328319eead618eed67a.tar.gz rust-bd2ff518cefe1dc9e1dcd328319eead618eed67a.zip | |
Move codegen_and_build_linker from Queries to Linker
Diffstat (limited to 'compiler/rustc_driver_impl/src/lib.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 3780e575b93..ad2acb03b3f 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -30,7 +30,7 @@ use rustc_errors::{ }; use rustc_feature::find_gated_cfg; use rustc_interface::util::{self, get_codegen_backend}; -use rustc_interface::{interface, passes, Queries}; +use rustc_interface::{interface, passes, Linker, Queries}; use rustc_lint::unerased_lint_store; use rustc_metadata::creader::MetadataLoader; use rustc_metadata::locator; @@ -447,7 +447,9 @@ fn run_compiler( return early_exit(); } - Ok(Some(queries.codegen_and_build_linker()?)) + queries.global_ctxt()?.enter(|tcx| { + Ok(Some(Linker::codegen_and_build_linker(tcx, &*compiler.codegen_backend)?)) + }) })?; // Linking is done outside the `compiler.enter()` so that the |
