librustc: drop AST before running LLVM, frees 400mb on a librustc build

This commit is contained in:
Graydon Hoare 2013-05-28 15:31:32 -07:00
parent 6264df5331
commit b4a3fe25c6
4 changed files with 75 additions and 71 deletions

View file

@ -101,7 +101,7 @@ impl<'self> PkgScript<'self> {
input: input,
sess: sess,
cfg: cfg,
crate: crate,
crate: crate.unwrap(),
build_dir: work_dir
}
}

View file

@ -426,7 +426,7 @@ pub fn compile_crate_from_input(input: &driver::input,
debug!("Calling compile_upto, outputs = %?", outputs);
let (crate, _) = driver::compile_upto(sess, copy cfg, input,
driver::cu_parse, Some(outputs));
let mut crate = crate;
let mut crate = crate.unwrap();
debug!("About to inject link_meta info...");
// Inject the inferred link_meta info if it's not already there