Skip to content

Commit 38e9640

Browse files
committed
Rename rustc_back::target to rustc_target::spec.
1 parent 6f03b80 commit 38e9640

File tree

146 files changed

+171
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+171
-179
lines changed

src/Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ lazy_static = "1.0.0"
1818
log = { version = "0.4", features = ["release_max_level_info", "std"] }
1919
proc_macro = { path = "../libproc_macro" }
2020
rustc_apfloat = { path = "../librustc_apfloat" }
21-
rustc_back = { path = "../librustc_back" }
21+
rustc_target = { path = "../librustc_target" }
2222
rustc_const_math = { path = "../librustc_const_math" }
2323
rustc_data_structures = { path = "../librustc_data_structures" }
2424
rustc_errors = { path = "../librustc_errors" }

src/librustc/ich/impls_misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl_stable_hash_for!(enum ::session::search_paths::PathKind {
2020
All
2121
});
2222

23-
impl_stable_hash_for!(enum ::rustc_back::target::PanicStrategy {
23+
impl_stable_hash_for!(enum ::rustc_target::spec::PanicStrategy {
2424
Abort,
2525
Unwind
2626
});

src/librustc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern crate graphviz;
8181
#[macro_use] extern crate lazy_static;
8282
#[cfg(windows)]
8383
extern crate libc;
84-
extern crate rustc_back;
84+
extern crate rustc_target;
8585
#[macro_use] extern crate rustc_data_structures;
8686
extern crate serialize;
8787
extern crate rustc_const_math;

src/librustc/middle/cstore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use syntax::ast;
3737
use syntax::ext::base::SyntaxExtension;
3838
use syntax::symbol::Symbol;
3939
use syntax_pos::Span;
40-
use rustc_back::target::Target;
40+
use rustc_target::spec::Target;
4141
use rustc_data_structures::sync::{MetadataRef, Lrc};
4242

4343
pub use self::NativeLibraryKind::*;

src/librustc/middle/dependency_format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use ty::TyCtxt;
6969
use middle::cstore::{self, DepKind};
7070
use middle::cstore::LinkagePreference::{self, RequireStatic, RequireDynamic};
7171
use util::nodemap::FxHashMap;
72-
use rustc_back::target::PanicStrategy;
72+
use rustc_target::spec::PanicStrategy;
7373

7474
/// A list of dependencies for a certain crate type.
7575
///

src/librustc/middle/weak_lang_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use session::config;
1414
use middle::lang_items;
1515

16-
use rustc_back::target::PanicStrategy;
16+
use rustc_target::spec::PanicStrategy;
1717
use syntax::ast;
1818
use syntax::symbol::Symbol;
1919
use syntax_pos::Span;

src/librustc/session/config.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use session::{early_error, early_warn, Session};
2222
use session::search_paths::SearchPaths;
2323

2424
use ich::StableHashingContext;
25-
use rustc_back::target::{LinkerFlavor, PanicStrategy, RelroLevel};
26-
use rustc_back::target::{Target, TargetTriple};
25+
use rustc_target::spec::{LinkerFlavor, PanicStrategy, RelroLevel};
26+
use rustc_target::spec::{Target, TargetTriple};
2727
use rustc_data_structures::stable_hasher::ToStableHashKey;
2828
use lint;
2929
use middle::cstore;
@@ -770,7 +770,7 @@ macro_rules! options {
770770
pub const parse_sanitizer: Option<&'static str> =
771771
Some("one of: `address`, `leak`, `memory` or `thread`");
772772
pub const parse_linker_flavor: Option<&'static str> =
773-
Some(::rustc_back::target::LinkerFlavor::one_of());
773+
Some(::rustc_target::spec::LinkerFlavor::one_of());
774774
pub const parse_optimization_fuel: Option<&'static str> =
775775
Some("crate=integer");
776776
pub const parse_unpretty: Option<&'static str> =
@@ -782,7 +782,7 @@ macro_rules! options {
782782
#[allow(dead_code)]
783783
mod $mod_set {
784784
use super::{$struct_name, Passes, SomePasses, AllPasses, Sanitizer, Lto};
785-
use rustc_back::target::{LinkerFlavor, PanicStrategy, RelroLevel};
785+
use rustc_target::spec::{LinkerFlavor, PanicStrategy, RelroLevel};
786786
use std::path::PathBuf;
787787

788788
$(
@@ -2323,8 +2323,7 @@ mod dep_tracking {
23232323
use super::{CrateType, DebugInfoLevel, ErrorOutputType, Lto, OptLevel, OutputTypes,
23242324
Passes, Sanitizer};
23252325
use syntax::feature_gate::UnstableFeatures;
2326-
use rustc_back::target::{PanicStrategy, RelroLevel};
2327-
use rustc_back::target::TargetTriple;
2326+
use rustc_target::spec::{PanicStrategy, RelroLevel, TargetTriple};
23282327
use syntax::edition::Edition;
23292328

23302329
pub trait DepTrackingHash {
@@ -2456,7 +2455,7 @@ mod tests {
24562455
use std::iter::FromIterator;
24572456
use std::path::PathBuf;
24582457
use super::{Externs, OutputType, OutputTypes};
2459-
use rustc_back::target::{PanicStrategy, RelroLevel};
2458+
use rustc_target::spec::{PanicStrategy, RelroLevel};
24602459
use syntax::symbol::Symbol;
24612460
use syntax::edition::{Edition, DEFAULT_EDITION};
24622461
use syntax;

src/librustc/session/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ use syntax::{ast, codemap};
4141
use syntax::feature_gate::AttributeType;
4242
use syntax_pos::{MultiSpan, Span};
4343

44-
use rustc_back::target::{LinkerFlavor, PanicStrategy};
45-
use rustc_back::target::{Target, TargetTriple};
44+
use rustc_target::spec::{LinkerFlavor, PanicStrategy};
45+
use rustc_target::spec::{Target, TargetTriple};
4646
use rustc_data_structures::flock;
4747
use jobserver::Client;
4848

src/librustc/ty/maps/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use util::nodemap::{DefIdSet, DefIdMap, ItemLocalSet};
4545
use util::common::{profq_msg, ErrorReported, ProfileQueriesMsg};
4646

4747
use rustc_data_structures::indexed_set::IdxSetBuf;
48-
use rustc_back::target::PanicStrategy;
48+
use rustc_target::spec::PanicStrategy;
4949
use rustc_data_structures::indexed_vec::IndexVec;
5050
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
5151
use rustc_data_structures::stable_hasher::StableVec;

src/librustc_back/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/librustc_driver/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ log = "0.4"
1515
env_logger = { version = "0.5", default-features = false }
1616
rustc = { path = "../librustc" }
1717
rustc_allocator = { path = "../librustc_allocator" }
18-
rustc_back = { path = "../librustc_back" }
18+
rustc_target = { path = "../librustc_target" }
1919
rustc_borrowck = { path = "../librustc_borrowck" }
2020
rustc_data_structures = { path = "../librustc_data_structures" }
2121
rustc_errors = { path = "../librustc_errors" }

src/librustc_driver/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern crate env_logger;
3535
extern crate libc;
3636
extern crate rustc;
3737
extern crate rustc_allocator;
38-
extern crate rustc_back;
38+
extern crate rustc_target;
3939
extern crate rustc_borrowck;
4040
extern crate rustc_data_structures;
4141
extern crate rustc_errors as errors;
@@ -1021,7 +1021,7 @@ impl RustcDefaultCalls {
10211021
for req in &sess.opts.prints {
10221022
match *req {
10231023
TargetList => {
1024-
let mut targets = rustc_back::target::get_targets().collect::<Vec<String>>();
1024+
let mut targets = rustc_target::spec::get_targets().collect::<Vec<String>>();
10251025
targets.sort();
10261026
println!("{}", targets.join("\n"));
10271027
},

src/librustc_metadata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ flate2 = "1.0"
1313
log = "0.4"
1414
proc_macro = { path = "../libproc_macro" }
1515
rustc = { path = "../librustc" }
16-
rustc_back = { path = "../librustc_back" }
16+
rustc_target = { path = "../librustc_target" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }
1818
rustc_errors = { path = "../librustc_errors" }
1919
serialize = { path = "../libserialize" }

src/librustc_metadata/creader.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use rustc::middle::allocator::AllocatorKind;
2121
use rustc::middle::cstore::DepKind;
2222
use rustc::session::{Session, CrateDisambiguator};
2323
use rustc::session::config::{Sanitizer, self};
24-
use rustc_back::target::PanicStrategy;
25-
use rustc_back::target::TargetTriple;
24+
use rustc_target::spec::{PanicStrategy, TargetTriple};
2625
use rustc::session::search_paths::PathKind;
2726
use rustc::middle;
2827
use rustc::middle::cstore::{validate_crate_name, ExternCrate, ExternCrateSource};

src/librustc_metadata/cstore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc::hir::map::definitions::DefPathTable;
1818
use rustc::hir::svh::Svh;
1919
use rustc::middle::cstore::{DepKind, ExternCrate, MetadataLoader};
2020
use rustc::session::{Session, CrateDisambiguator};
21-
use rustc_back::target::PanicStrategy;
21+
use rustc_target::spec::PanicStrategy;
2222
use rustc_data_structures::indexed_vec::IndexVec;
2323
use rustc::util::nodemap::{FxHashMap, NodeMap};
2424

src/librustc_metadata/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern crate proc_macro;
3838

3939
#[macro_use]
4040
extern crate rustc;
41-
extern crate rustc_back;
41+
extern crate rustc_target;
4242
#[macro_use]
4343
extern crate rustc_data_structures;
4444

src/librustc_metadata/locator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ use rustc::util::nodemap::FxHashMap;
236236
use errors::DiagnosticBuilder;
237237
use syntax::symbol::Symbol;
238238
use syntax_pos::Span;
239-
use rustc_back::target::{Target, TargetTriple};
239+
use rustc_target::spec::{Target, TargetTriple};
240240

241241
use std::cmp;
242242
use std::collections::HashSet;

src/librustc_metadata/schema.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use rustc::middle::lang_items;
1919
use rustc::mir;
2020
use rustc::session::CrateDisambiguator;
2121
use rustc::ty::{self, Ty, ReprOptions};
22-
use rustc_back::target::PanicStrategy;
23-
use rustc_back::target::TargetTriple;
22+
use rustc_target::spec::{PanicStrategy, TargetTriple};
2423

2524
use rustc_serialize as serialize;
2625
use syntax::{ast, attr};

src/librustc_mir/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ graphviz = { path = "../libgraphviz" }
1515
log = "0.4"
1616
log_settings = "0.1.1"
1717
rustc = { path = "../librustc" }
18-
rustc_back = { path = "../librustc_back" }
18+
rustc_target = { path = "../librustc_target" }
1919
rustc_const_math = { path = "../librustc_const_math" }
2020
rustc_data_structures = { path = "../librustc_data_structures" }
2121
rustc_errors = { path = "../librustc_errors" }

src/librustc_mir/build/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc::mir::visit::{MutVisitor, TyContext};
2020
use rustc::ty::{self, Ty, TyCtxt};
2121
use rustc::ty::subst::Substs;
2222
use rustc::util::nodemap::NodeMap;
23-
use rustc_back::target::PanicStrategy;
23+
use rustc_target::spec::PanicStrategy;
2424
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
2525
use shim;
2626
use std::mem;

src/librustc_mir/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern crate rustc_errors;
4949
#[macro_use]
5050
extern crate syntax;
5151
extern crate syntax_pos;
52-
extern crate rustc_back;
52+
extern crate rustc_target;
5353
extern crate rustc_const_math;
5454
extern crate core; // for NonZero
5555
extern crate log_settings;

src/librustc_back/Cargo.toml renamed to src/librustc_target/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "rustc_back"
3+
name = "rustc_target"
44
version = "0.0.0"
55

66
[lib]
7-
name = "rustc_back"
7+
name = "rustc_target"
88
path = "lib.rs"
99
crate-type = ["dylib"]
1010

src/librustc_target/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
`librustc_target` contains some very low-level details that are
2+
specific to different compilation targets and so forth.
3+
4+
For more information about how rustc works, see the [rustc guide].
5+
6+
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/
File renamed without changes.

src/librustc_back/lib.rs renamed to src/librustc_target/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Some stuff used by rustc that doesn't have many dependencies
1212
//!
1313
//! Originally extracted from rustc::back, which was nominally the
14-
//! compiler 'backend', though LLVM is rustc's backend, so rustc_back
14+
//! compiler 'backend', though LLVM is rustc's backend, so rustc_target
1515
//! is really just odds-and-ends relating to code gen and linking.
1616
//! This crate mostly exists to make rustc smaller, so we might put
1717
//! more 'stuff' here in the future. It does not have a dependency on
@@ -36,4 +36,4 @@ extern crate serialize;
3636

3737
extern crate serialize as rustc_serialize; // used by deriving
3838

39-
pub mod target;
39+
pub mod spec;

0 commit comments

Comments
 (0)