rustc_trans: move save to librustc_save_analysis.

This commit is contained in:
Eduard Burtescu 2016-03-22 18:40:24 +02:00
parent 5efdde0de1
commit 98359283a4
11 changed files with 52 additions and 18 deletions

View File

@ -57,7 +57,7 @@ TARGET_CRATES := libc std term \
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
rustc_data_structures rustc_front rustc_platform_intrinsics \
rustc_plugin rustc_metadata rustc_passes
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
flate arena graphviz rbml log serialize
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@ -102,7 +102,7 @@ DEPS_rustc_data_structures := std log serialize
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
rustc_metadata syntax_ext rustc_passes
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
DEPS_rustc_front := std syntax log serialize
DEPS_rustc_lint := rustc log syntax
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
@ -116,6 +116,7 @@ DEPS_rustc_privacy := rustc rustc_front log syntax
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
rustc_const_eval
DEPS_rustc_save_analysis := rustc log syntax rustc_front
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \

View File

@ -25,6 +25,7 @@ rustc_plugin = { path = "../librustc_plugin" }
rustc_passes = { path = "../librustc_passes" }
rustc_privacy = { path = "../librustc_privacy" }
rustc_resolve = { path = "../librustc_resolve" }
rustc_save_analysis = { path = "../librustc_save_analysis" }
rustc_trans = { path = "../librustc_trans" }
rustc_typeck = { path = "../librustc_typeck" }
rustc_metadata = { path = "../librustc_metadata" }

View File

@ -48,6 +48,7 @@ extern crate rustc_privacy;
extern crate rustc_metadata;
extern crate rustc_mir;
extern crate rustc_resolve;
extern crate rustc_save_analysis;
extern crate rustc_trans;
extern crate rustc_typeck;
extern crate serialize;
@ -62,8 +63,8 @@ use driver::CompileController;
use pretty::{PpMode, UserIdentifiedItem};
use rustc_resolve as resolve;
use rustc_save_analysis as save;
use rustc_trans::back::link;
use rustc_trans::save;
use rustc::session::{config, Session, build_session, CompileResult};
use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType};
use rustc::session::config::{get_unstable_features_setting, OptionStability};

View File

@ -0,0 +1,15 @@
[package]
authors = ["The Rust Project Developers"]
name = "rustc_save_analysis"
version = "0.0.0"
[lib]
name = "rustc_save_analysis"
path = "lib.rs"
crate-type = ["dylib"]
[dependencies]
log = { path = "../liblog" }
rustc = { path = "../librustc" }
rustc_front = { path = "../librustc_front" }
syntax = { path = "../libsyntax" }

View File

@ -10,7 +10,7 @@
use std::io::Write;
use middle::def_id::{DefId, DefIndex};
use rustc::middle::def_id::{DefId, DefIndex};
use syntax::codemap::Span;
use super::data::*;

View File

@ -15,7 +15,7 @@
use std::hash::Hasher;
use middle::def_id::DefId;
use rustc::middle::def_id::DefId;
use rustc::ty;
use syntax::ast::{CrateNum, NodeId};
use syntax::codemap::Span;

View File

@ -27,10 +27,9 @@
//! is used for recording the output in a format-agnostic way (see CsvDumper
//! for an example).
use session::Session;
use middle::def::Def;
use middle::def_id::DefId;
use rustc::middle::def::Def;
use rustc::middle::def_id::DefId;
use rustc::session::Session;
use rustc::ty::{self, TyCtxt};
use std::collections::HashSet;

View File

@ -8,19 +8,37 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_name = "rustc_save_analysis"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![cfg_attr(not(stage0), deny(warnings))]
#![feature(custom_attribute)]
#![allow(unused_attributes)]
#![feature(rustc_private)]
#![feature(staged_api)]
extern crate rustc;
extern crate rustc_front;
#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
use rustc_front::{hir, lowering};
use rustc::front::map::NodeItem;
use rustc::middle::def::Def;
use rustc::middle::def_id::DefId;
use rustc::session::config::CrateType::CrateTypeExecutable;
use rustc::ty::{self, TyCtxt};
use middle::def::Def;
use middle::def_id::DefId;
use std::env;
use std::fs::{self, File};
use std::path::{Path, PathBuf};
use rustc_front;
use rustc_front::{hir, lowering};
use rustc::front::map::NodeItem;
use rustc::session::config::CrateType::CrateTypeExecutable;
use syntax::ast::{self, NodeId, PatKind};
use syntax::ast_util;
use syntax::codemap::*;

View File

@ -10,7 +10,7 @@
use rustc::session::Session;
use save::generated_code;
use generated_code;
use std::cell::Cell;
use std::env;

View File

@ -77,7 +77,6 @@ pub mod back {
pub mod diagnostics;
pub mod trans;
pub mod save;
pub mod lib {
pub use llvm;