2019-03-26 19:07:13 +01:00
|
|
|
use crate::interface::{Compiler, Result};
|
2019-11-27 13:17:58 +01:00
|
|
|
use crate::passes::{self, BoxedResolver, QueryContext};
|
2019-03-26 19:07:13 +01:00
|
|
|
|
2018-12-08 20:30:23 +01:00
|
|
|
use rustc_incremental::DepGraphFuture;
|
2019-11-26 23:16:48 +01:00
|
|
|
use rustc_data_structures::sync::{Lrc, Once, WorkerLocal};
|
2019-11-24 15:59:22 +01:00
|
|
|
use rustc_codegen_utils::codegen_backend::CodegenBackend;
|
2019-07-23 20:34:17 +03:00
|
|
|
use rustc::session::config::{OutputFilenames, OutputType};
|
2018-12-08 20:30:23 +01:00
|
|
|
use rustc::util::common::{time, ErrorReported};
|
2019-11-26 23:16:48 +01:00
|
|
|
use rustc::arena::Arena;
|
2018-12-08 20:30:23 +01:00
|
|
|
use rustc::hir;
|
2019-10-10 19:33:00 -04:00
|
|
|
use rustc::lint;
|
|
|
|
use rustc::session::Session;
|
2019-10-09 09:53:13 -04:00
|
|
|
use rustc::lint::LintStore;
|
2018-12-08 20:30:23 +01:00
|
|
|
use rustc::hir::def_id::LOCAL_CRATE;
|
|
|
|
use rustc::ty::steal::Steal;
|
2019-11-26 22:51:02 +01:00
|
|
|
use rustc::ty::{AllArenas, ResolverOutputs, GlobalCtxt};
|
2018-12-08 20:30:23 +01:00
|
|
|
use rustc::dep_graph::DepGraph;
|
|
|
|
use std::cell::{Ref, RefMut, RefCell};
|
|
|
|
use std::rc::Rc;
|
|
|
|
use std::any::Any;
|
|
|
|
use std::mem;
|
2019-07-23 20:34:17 +03:00
|
|
|
use syntax::{self, ast};
|
2018-12-08 20:30:23 +01:00
|
|
|
|
|
|
|
/// Represent the result of a query.
|
|
|
|
/// This result can be stolen with the `take` method and returned with the `give` method.
|
|
|
|
pub struct Query<T> {
|
|
|
|
result: RefCell<Option<Result<T>>>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Query<T> {
|
|
|
|
fn compute<F: FnOnce() -> Result<T>>(&self, f: F) -> Result<&Query<T>> {
|
|
|
|
let mut result = self.result.borrow_mut();
|
|
|
|
if result.is_none() {
|
|
|
|
*result = Some(f());
|
|
|
|
}
|
|
|
|
result.as_ref().unwrap().as_ref().map(|_| self).map_err(|err| *err)
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Takes ownership of the query result. Further attempts to take or peek the query
|
|
|
|
/// result will panic unless it is returned by calling the `give` method.
|
|
|
|
pub fn take(&self) -> T {
|
|
|
|
self.result
|
|
|
|
.borrow_mut()
|
|
|
|
.take()
|
|
|
|
.expect("missing query result")
|
|
|
|
.unwrap()
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Borrows the query result using the RefCell. Panics if the result is stolen.
|
|
|
|
pub fn peek(&self) -> Ref<'_, T> {
|
|
|
|
Ref::map(self.result.borrow(), |r| {
|
|
|
|
r.as_ref().unwrap().as_ref().expect("missing query result")
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Mutably borrows the query result using the RefCell. Panics if the result is stolen.
|
|
|
|
pub fn peek_mut(&self) -> RefMut<'_, T> {
|
|
|
|
RefMut::map(self.result.borrow_mut(), |r| {
|
|
|
|
r.as_mut().unwrap().as_mut().expect("missing query result")
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Default for Query<T> {
|
|
|
|
fn default() -> Self {
|
|
|
|
Query {
|
|
|
|
result: RefCell::new(None),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-27 13:13:57 +01:00
|
|
|
pub struct Queries<'tcx> {
|
|
|
|
compiler: &'tcx Compiler,
|
|
|
|
gcx: Once<GlobalCtxt<'tcx>>,
|
2019-11-26 22:51:02 +01:00
|
|
|
arenas: Once<AllArenas>,
|
|
|
|
forest: Once<hir::map::Forest>,
|
2019-11-24 15:59:22 +01:00
|
|
|
|
2019-11-27 13:13:57 +01:00
|
|
|
local_arena: WorkerLocal<Arena<'tcx>>,
|
2019-11-26 23:16:48 +01:00
|
|
|
|
2018-12-08 20:30:23 +01:00
|
|
|
dep_graph_future: Query<Option<DepGraphFuture>>,
|
|
|
|
parse: Query<ast::Crate>,
|
|
|
|
crate_name: Query<String>,
|
2019-11-22 23:06:56 +03:00
|
|
|
register_plugins: Query<(ast::Crate, Lrc<LintStore>)>,
|
2019-10-09 09:53:13 -04:00
|
|
|
expansion: Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>,
|
2018-12-08 20:30:23 +01:00
|
|
|
dep_graph: Query<DepGraph>,
|
2019-11-27 13:13:57 +01:00
|
|
|
lower_to_hir: Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>,
|
2018-12-08 20:30:23 +01:00
|
|
|
prepare_outputs: Query<OutputFilenames>,
|
2019-11-27 13:17:58 +01:00
|
|
|
global_ctxt: Query<QueryContext<'tcx>>,
|
2018-12-08 20:30:23 +01:00
|
|
|
ongoing_codegen: Query<Box<dyn Any>>,
|
|
|
|
}
|
|
|
|
|
2019-11-27 13:13:57 +01:00
|
|
|
impl<'tcx> Queries<'tcx> {
|
|
|
|
pub fn new(compiler: &'tcx Compiler) -> Queries<'tcx> {
|
2019-11-24 15:59:22 +01:00
|
|
|
Queries {
|
|
|
|
compiler,
|
2019-11-26 22:51:02 +01:00
|
|
|
gcx: Once::new(),
|
|
|
|
arenas: Once::new(),
|
|
|
|
forest: Once::new(),
|
2019-11-26 23:16:48 +01:00
|
|
|
local_arena: WorkerLocal::new(|_| Arena::default()),
|
2019-11-24 15:59:22 +01:00
|
|
|
dep_graph_future: Default::default(),
|
|
|
|
parse: Default::default(),
|
|
|
|
crate_name: Default::default(),
|
|
|
|
register_plugins: Default::default(),
|
|
|
|
expansion: Default::default(),
|
|
|
|
dep_graph: Default::default(),
|
|
|
|
lower_to_hir: Default::default(),
|
|
|
|
prepare_outputs: Default::default(),
|
|
|
|
global_ctxt: Default::default(),
|
|
|
|
ongoing_codegen: Default::default(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn session(&self) -> &Lrc<Session> {
|
|
|
|
&self.compiler.sess
|
|
|
|
}
|
|
|
|
fn codegen_backend(&self) -> &Lrc<Box<dyn CodegenBackend>> {
|
|
|
|
&self.compiler.codegen_backend()
|
|
|
|
}
|
|
|
|
|
2018-12-08 20:30:23 +01:00
|
|
|
pub fn dep_graph_future(&self) -> Result<&Query<Option<DepGraphFuture>>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.dep_graph_future.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
Ok(if self.session().opts.build_dep_graph() {
|
|
|
|
Some(rustc_incremental::load_dep_graph(self.session()))
|
|
|
|
} else {
|
|
|
|
None
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn parse(&self) -> Result<&Query<ast::Crate>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.parse.compute(|| {
|
|
|
|
passes::parse(self.session(), &self.compiler.input).map_err(
|
2018-12-08 20:30:23 +01:00
|
|
|
|mut parse_error| {
|
|
|
|
parse_error.emit();
|
|
|
|
ErrorReported
|
|
|
|
},
|
|
|
|
)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-11-22 23:06:56 +03:00
|
|
|
pub fn register_plugins(&self) -> Result<&Query<(ast::Crate, Lrc<LintStore>)>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.register_plugins.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
let crate_name = self.crate_name()?.peek().clone();
|
|
|
|
let krate = self.parse()?.take();
|
|
|
|
|
2019-10-10 19:33:00 -04:00
|
|
|
let empty: &(dyn Fn(&Session, &mut lint::LintStore) + Sync + Send) = &|_, _| {};
|
2019-08-30 16:53:34 +10:00
|
|
|
let result = passes::register_plugins(
|
2018-12-08 20:30:23 +01:00
|
|
|
self.session(),
|
2019-10-16 19:57:10 +03:00
|
|
|
&*self.codegen_backend().metadata_loader(),
|
2019-11-24 15:59:22 +01:00
|
|
|
self.compiler.register_lints
|
2019-10-10 19:33:00 -04:00
|
|
|
.as_ref()
|
|
|
|
.map(|p| &**p)
|
|
|
|
.unwrap_or_else(|| empty),
|
2018-12-08 20:30:23 +01:00
|
|
|
krate,
|
|
|
|
&crate_name,
|
2019-08-30 16:53:34 +10:00
|
|
|
);
|
|
|
|
|
|
|
|
// Compute the dependency graph (in the background). We want to do
|
|
|
|
// this as early as possible, to give the DepGraph maximum time to
|
|
|
|
// load before dep_graph() is called, but it also can't happen
|
|
|
|
// until after rustc_incremental::prepare_session_directory() is
|
|
|
|
// called, which happens within passes::register_plugins().
|
|
|
|
self.dep_graph_future().ok();
|
|
|
|
|
|
|
|
result
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn crate_name(&self) -> Result<&Query<String>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.crate_name.compute(|| {
|
|
|
|
Ok(match self.compiler.crate_name {
|
2018-12-08 20:30:23 +01:00
|
|
|
Some(ref crate_name) => crate_name.clone(),
|
2019-08-30 09:03:58 +10:00
|
|
|
None => {
|
|
|
|
let parse_result = self.parse()?;
|
|
|
|
let krate = parse_result.peek();
|
|
|
|
rustc_codegen_utils::link::find_crate_name(
|
|
|
|
Some(self.session()),
|
|
|
|
&krate.attrs,
|
2019-11-24 15:59:22 +01:00
|
|
|
&self.compiler.input
|
2019-08-30 09:03:58 +10:00
|
|
|
)
|
|
|
|
}
|
|
|
|
})
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn expansion(
|
|
|
|
&self
|
2019-10-09 09:53:13 -04:00
|
|
|
) -> Result<&Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.expansion.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
let crate_name = self.crate_name()?.peek().clone();
|
2019-11-22 23:06:56 +03:00
|
|
|
let (krate, lint_store) = self.register_plugins()?.take();
|
2018-12-08 20:30:23 +01:00
|
|
|
passes::configure_and_expand(
|
2019-11-24 15:59:22 +01:00
|
|
|
self.session().clone(),
|
2019-10-09 09:53:13 -04:00
|
|
|
lint_store.clone(),
|
2019-10-20 03:28:36 +03:00
|
|
|
self.codegen_backend().metadata_loader(),
|
2018-12-08 20:30:23 +01:00
|
|
|
krate,
|
|
|
|
&crate_name,
|
2019-10-09 09:53:13 -04:00
|
|
|
).map(|(krate, resolver)| {
|
|
|
|
(krate, Steal::new(Rc::new(RefCell::new(resolver))), lint_store)
|
|
|
|
})
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn dep_graph(&self) -> Result<&Query<DepGraph>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.dep_graph.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
Ok(match self.dep_graph_future()?.take() {
|
|
|
|
None => DepGraph::new_disabled(),
|
|
|
|
Some(future) => {
|
|
|
|
let (prev_graph, prev_work_products) =
|
|
|
|
time(self.session(), "blocked while dep-graph loading finishes", || {
|
|
|
|
future.open().unwrap_or_else(|e| rustc_incremental::LoadResult::Error {
|
|
|
|
message: format!("could not decode incremental cache: {:?}", e),
|
|
|
|
}).open(self.session())
|
|
|
|
});
|
|
|
|
DepGraph::new(prev_graph, prev_work_products)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-10-21 23:32:51 +03:00
|
|
|
pub fn lower_to_hir(
|
2019-11-27 13:13:57 +01:00
|
|
|
&'tcx self,
|
|
|
|
) -> Result<&Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.lower_to_hir.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
let expansion_result = self.expansion()?;
|
2019-07-24 14:43:40 -04:00
|
|
|
let peeked = expansion_result.peek();
|
|
|
|
let krate = &peeked.0;
|
|
|
|
let resolver = peeked.1.steal();
|
2019-10-09 09:53:13 -04:00
|
|
|
let lint_store = &peeked.2;
|
2019-11-26 22:51:02 +01:00
|
|
|
let hir = resolver.borrow_mut().access(|resolver| {
|
2018-12-08 20:30:23 +01:00
|
|
|
passes::lower_to_hir(
|
|
|
|
self.session(),
|
2019-10-09 09:53:13 -04:00
|
|
|
lint_store,
|
2018-12-08 20:30:23 +01:00
|
|
|
resolver,
|
|
|
|
&*self.dep_graph()?.peek(),
|
|
|
|
&krate
|
|
|
|
)
|
2019-11-26 22:51:02 +01:00
|
|
|
})?;
|
|
|
|
let hir = self.forest.init_locking(|| hir);
|
2019-10-21 23:32:51 +03:00
|
|
|
Ok((hir, Steal::new(BoxedResolver::to_resolver_outputs(resolver))))
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn prepare_outputs(&self) -> Result<&Query<OutputFilenames>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.prepare_outputs.compute(|| {
|
2019-10-20 03:28:36 +03:00
|
|
|
let expansion_result = self.expansion()?;
|
2019-10-21 23:32:51 +03:00
|
|
|
let (krate, boxed_resolver, _) = &*expansion_result.peek();
|
2018-12-08 20:30:23 +01:00
|
|
|
let crate_name = self.crate_name()?;
|
|
|
|
let crate_name = crate_name.peek();
|
2019-11-24 16:41:43 +01:00
|
|
|
passes::prepare_outputs(
|
|
|
|
self.session(), self.compiler, &krate, &boxed_resolver, &crate_name
|
|
|
|
)
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-11-27 13:17:58 +01:00
|
|
|
pub fn global_ctxt(&'tcx self) -> Result<&Query<QueryContext<'tcx>>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.global_ctxt.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
let crate_name = self.crate_name()?.peek().clone();
|
|
|
|
let outputs = self.prepare_outputs()?.peek().clone();
|
2019-10-09 09:53:13 -04:00
|
|
|
let lint_store = self.expansion()?.peek().2.clone();
|
2019-11-26 22:51:02 +01:00
|
|
|
let hir = self.lower_to_hir()?.peek();
|
|
|
|
let (ref hir_forest, ref resolver_outputs) = &*hir;
|
2018-12-08 20:30:23 +01:00
|
|
|
Ok(passes::create_global_ctxt(
|
2019-11-24 15:59:22 +01:00
|
|
|
self.compiler,
|
2019-10-09 09:53:13 -04:00
|
|
|
lint_store,
|
2019-11-26 22:51:02 +01:00
|
|
|
hir_forest,
|
2019-10-21 23:32:51 +03:00
|
|
|
resolver_outputs.steal(),
|
2018-12-08 20:30:23 +01:00
|
|
|
outputs,
|
2019-11-26 22:51:02 +01:00
|
|
|
&crate_name,
|
|
|
|
&self.gcx,
|
|
|
|
&self.arenas,
|
2019-11-26 23:16:48 +01:00
|
|
|
&self.local_arena,
|
2019-11-26 22:51:02 +01:00
|
|
|
))
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-11-27 13:13:57 +01:00
|
|
|
pub fn ongoing_codegen(&'tcx self) -> Result<&Query<Box<dyn Any>>> {
|
2019-11-24 15:59:22 +01:00
|
|
|
self.ongoing_codegen.compute(|| {
|
2018-12-08 20:30:23 +01:00
|
|
|
let outputs = self.prepare_outputs()?;
|
|
|
|
self.global_ctxt()?.peek_mut().enter(|tcx| {
|
|
|
|
tcx.analysis(LOCAL_CRATE).ok();
|
|
|
|
|
|
|
|
// Don't do code generation if there were any errors
|
|
|
|
self.session().compile_status()?;
|
|
|
|
|
|
|
|
Ok(passes::start_codegen(
|
|
|
|
&***self.codegen_backend(),
|
|
|
|
tcx,
|
|
|
|
&*outputs.peek()
|
|
|
|
))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-11-27 13:13:57 +01:00
|
|
|
pub fn linker(&'tcx self) -> Result<Linker> {
|
2019-11-24 16:32:57 +01:00
|
|
|
let dep_graph = self.dep_graph()?;
|
|
|
|
let prepare_outputs = self.prepare_outputs()?;
|
|
|
|
let ongoing_codegen = self.ongoing_codegen()?;
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 16:32:57 +01:00
|
|
|
let sess = self.session().clone();
|
|
|
|
let codegen_backend = self.codegen_backend().clone();
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 16:32:57 +01:00
|
|
|
Ok(Linker {
|
|
|
|
sess,
|
2019-11-25 17:25:47 +01:00
|
|
|
dep_graph: dep_graph.peek().clone(),
|
2019-11-24 16:32:57 +01:00
|
|
|
prepare_outputs: prepare_outputs.take(),
|
|
|
|
ongoing_codegen: ongoing_codegen.take(),
|
|
|
|
codegen_backend,
|
2018-12-08 20:30:23 +01:00
|
|
|
})
|
|
|
|
}
|
2019-11-24 15:59:22 +01:00
|
|
|
}
|
|
|
|
|
2019-11-24 16:32:57 +01:00
|
|
|
pub struct Linker {
|
|
|
|
sess: Lrc<Session>,
|
|
|
|
dep_graph: DepGraph,
|
|
|
|
prepare_outputs: OutputFilenames,
|
|
|
|
ongoing_codegen: Box<dyn Any>,
|
|
|
|
codegen_backend: Lrc<Box<dyn CodegenBackend>>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Linker {
|
|
|
|
pub fn link(self) -> Result<()> {
|
|
|
|
self.codegen_backend.join_codegen_and_link(
|
|
|
|
self.ongoing_codegen,
|
|
|
|
&self.sess,
|
|
|
|
&self.dep_graph,
|
|
|
|
&self.prepare_outputs,
|
|
|
|
).map_err(|_| ErrorReported)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-24 15:59:22 +01:00
|
|
|
impl Compiler {
|
2019-11-25 18:36:18 +01:00
|
|
|
pub fn enter<F, T>(&self, f: F) -> T
|
2019-11-26 22:51:02 +01:00
|
|
|
where F: for<'tcx> FnOnce(&'tcx Queries<'tcx>) -> T
|
2019-11-24 15:59:22 +01:00
|
|
|
{
|
|
|
|
let queries = Queries::new(&self);
|
2019-11-26 22:51:02 +01:00
|
|
|
let ret = f(&queries);
|
|
|
|
|
|
|
|
if self.session().opts.debugging_opts.query_stats {
|
|
|
|
if let Ok(gcx) = queries.global_ctxt() {
|
|
|
|
gcx.peek().print_stats();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ret
|
2019-11-24 15:59:22 +01:00
|
|
|
}
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-08-30 17:27:35 +10:00
|
|
|
// This method is different to all the other methods in `Compiler` because
|
|
|
|
// it lacks a `Queries` entry. It's also not currently used. It does serve
|
|
|
|
// as an example of how `Compiler` can be used, with additional steps added
|
|
|
|
// between some passes. And see `rustc_driver::run_compiler` for a more
|
|
|
|
// complex example.
|
2018-12-08 20:30:23 +01:00
|
|
|
pub fn compile(&self) -> Result<()> {
|
2019-11-24 16:32:57 +01:00
|
|
|
let linker = self.enter(|queries| {
|
2019-11-24 15:59:22 +01:00
|
|
|
queries.prepare_outputs()?;
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 15:59:22 +01:00
|
|
|
if self.session().opts.output_types.contains_key(&OutputType::DepInfo)
|
|
|
|
&& self.session().opts.output_types.len() == 1
|
|
|
|
{
|
2019-11-24 16:32:57 +01:00
|
|
|
return Ok(None)
|
2019-11-24 15:59:22 +01:00
|
|
|
}
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 15:59:22 +01:00
|
|
|
queries.global_ctxt()?;
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 15:59:22 +01:00
|
|
|
// Drop AST after creating GlobalCtxt to free memory.
|
|
|
|
mem::drop(queries.expansion()?.take());
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 15:59:22 +01:00
|
|
|
queries.ongoing_codegen()?;
|
2018-12-08 20:30:23 +01:00
|
|
|
|
2019-11-24 16:32:57 +01:00
|
|
|
let linker = queries.linker()?;
|
|
|
|
Ok(Some(linker))
|
|
|
|
})?;
|
|
|
|
|
|
|
|
if let Some(linker) = linker {
|
|
|
|
linker.link()?
|
|
|
|
}
|
|
|
|
|
|
|
|
Ok(())
|
2018-12-08 20:30:23 +01:00
|
|
|
}
|
|
|
|
}
|