Rollup merge of #66791 - cjgillot:arena, r=Mark-Simulacrum

Handle GlobalCtxt directly from librustc_interface query system

This PR constructs the `GlobalCtxt` as a member of the `Queries` in librustc_interface.
This simplifies the code to construct it, at the expense of added complexity in the query control flow.
This allows to handle the arenas directly from librustc_interface.

Based on #66707

r? @Zoxc
This commit is contained in:
Ralf Jung 2019-11-29 22:57:34 +01:00 committed by GitHub
commit 6ea1df2340
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 348 additions and 276 deletions

View file

@ -66,6 +66,11 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
interface::run_compiler(config, |compiler| {
// This runs all the passes prior to linking, too.
compiler.link().ok();
let linker = compiler.enter(|queries| {
queries.linker()
});
if let Ok(linker) = linker {
linker.link();
}
});
}