Move trans, back, driver, and back into a new crate, rustc_trans. Reduces memory usage significantly and opens opportunities for more parallel compilation.
This commit is contained in:
parent
f637f1c5a2
commit
dc6e414e6f
80 changed files with 640 additions and 532 deletions
|
|
@ -38,8 +38,8 @@ use syntax::parse::token::InternedString;
|
|||
use syntax::parse::token;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rustc::back::link;
|
||||
use rustc::driver::driver;
|
||||
use rustc_trans::back::link;
|
||||
use rustc_trans::driver::driver;
|
||||
use rustc::metadata::cstore;
|
||||
use rustc::metadata::csearch;
|
||||
use rustc::metadata::decoder;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@
|
|||
// except according to those terms.
|
||||
pub use self::MaybeTyped::*;
|
||||
|
||||
use rustc::driver::{config, driver, session};
|
||||
use rustc_trans::driver::driver;
|
||||
use rustc::session::{mod, config};
|
||||
use rustc::middle::{privacy, ty};
|
||||
use rustc::lint;
|
||||
use rustc::back::link;
|
||||
use rustc_trans::back::link;
|
||||
|
||||
use syntax::{ast, ast_map, codemap, diagnostic};
|
||||
|
||||
|
|
@ -93,7 +94,7 @@ pub fn run_core(libs: Vec<Path>, cfgs: Vec<String>, externs: Externs,
|
|||
crate_types: vec!(config::CrateTypeRlib),
|
||||
lint_opts: vec!((warning_lint, lint::Allow)),
|
||||
externs: externs,
|
||||
target_triple: triple.unwrap_or(driver::host_triple().to_string()),
|
||||
target_triple: triple.unwrap_or(config::host_triple().to_string()),
|
||||
cfg: config::parse_cfgspecs(cfgs),
|
||||
..config::basic_options().clone()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ extern crate arena;
|
|||
extern crate getopts;
|
||||
extern crate libc;
|
||||
extern crate rustc;
|
||||
extern crate rustc_trans;
|
||||
extern crate serialize;
|
||||
extern crate syntax;
|
||||
extern crate "test" as testing;
|
||||
|
|
@ -155,7 +156,7 @@ pub fn main_args(args: &[String]) -> int {
|
|||
usage(args[0].as_slice());
|
||||
return 0;
|
||||
} else if matches.opt_present("version") {
|
||||
match rustc::driver::version("rustdoc", &matches) {
|
||||
match rustc_trans::driver::version("rustdoc", &matches) {
|
||||
Some(err) => {
|
||||
println!("{}", err);
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@ use std::string::String;
|
|||
|
||||
use std::collections::{HashSet, HashMap};
|
||||
use testing;
|
||||
use rustc::back::write;
|
||||
use rustc::driver::config;
|
||||
use rustc::driver::driver;
|
||||
use rustc::driver::session;
|
||||
use rustc::session::{mod, config};
|
||||
use rustc_trans::driver::driver;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::{CodeMap, dummy_spanned};
|
||||
use syntax::diagnostic;
|
||||
|
|
@ -119,7 +117,7 @@ fn runtest(test: &str, cratename: &str, libs: Vec<Path>, externs: core::Externs,
|
|||
maybe_sysroot: Some(os::self_exe_path().unwrap().dir_path()),
|
||||
addl_lib_search_paths: RefCell::new(libs),
|
||||
crate_types: vec!(config::CrateTypeExecutable),
|
||||
output_types: vec!(write::OutputTypeExe),
|
||||
output_types: vec!(config::OutputTypeExe),
|
||||
no_trans: no_run,
|
||||
externs: externs,
|
||||
cg: config::CodegenOptions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue