Skip to content

Commit 1e7e60d

Browse files
committed
---
yaml --- r: 124263 b: refs/heads/try c: cf360f3 h: refs/heads/master i: 124261: 3c6c15a 124259: 9afb5a0 124255: 4325127 v: v3
1 parent 98cad7b commit 1e7e60d

File tree

15 files changed

+167
-126
lines changed

15 files changed

+167
-126
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 6c35d513cea468b30759b4f78becf28f11a123c0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: afbcbbc77ffc6b10053bc543daf7d2e05d68cc01
5-
refs/heads/try: d3096c2348b463ccdbb1c066b688d487e72e6c73
5+
refs/heads/try: cf360f328aad26bd19490270aa9716645aa4d4cf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/crates.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
url log regex graphviz core rlibc alloc debug rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros rustc_llvm
56+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5758
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5859
TOOLS := compiletest rustdoc rustc
5960

@@ -71,8 +72,9 @@ DEPS_rustuv := std native:uv native:uv_support
7172
DEPS_native := std
7273
DEPS_syntax := std term serialize log fmt_macros debug
7374
DEPS_rustc := syntax flate arena serialize getopts \
74-
time log graphviz debug rustc_llvm
75+
time log graphviz debug rustc_llvm rustc_back
7576
DEPS_rustc_llvm := native:rustllvm libc std
77+
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7678
DEPS_rustdoc := rustc native:hoedown serialize getopts \
7779
test time debug
7880
DEPS_flate := std native:miniz

branches/try/src/librustc/back/archive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
//! A helper class for dealing with static archives
1212
13-
use back::link::{get_ar_prog};
13+
use super::link::{get_ar_prog};
1414
use driver::session::Session;
1515
use metadata::filesearch;
16-
use lib::llvm::{ArchiveRef, llvm};
16+
use llvm::{ArchiveRef, llvm};
1717

1818
use libc;
1919
use std::io::process::{Command, ProcessOutput};

branches/try/src/librustc/back/link.rs

Lines changed: 92 additions & 94 deletions
Large diffs are not rendered by default.

branches/try/src/librustc/back/lto.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use back::archive::ArchiveRO;
12-
use back::link;
11+
use super::archive::ArchiveRO;
12+
use super::link;
1313
use driver::session;
1414
use driver::config;
15-
use lib::llvm::{ModuleRef, TargetMachineRef, llvm, True, False};
15+
use llvm::{ModuleRef, TargetMachineRef, llvm, True, False};
1616
use metadata::cstore;
1717
use util::common::time;
1818

branches/try/src/librustc/lib.rs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,32 @@ extern crate getopts;
4242
extern crate graphviz;
4343
extern crate libc;
4444
extern crate llvm = "rustc_llvm";
45+
extern crate rustc_back = "rustc_back";
4546
extern crate serialize;
4647
extern crate time;
4748
#[phase(plugin, link)] extern crate log;
4849
#[phase(plugin, link)] extern crate syntax;
4950

5051
mod diagnostics;
5152

53+
pub mod back {
54+
pub use rustc_back::abi;
55+
pub use rustc_back::arm;
56+
pub use rustc_back::mips;
57+
pub use rustc_back::mipsel;
58+
pub use rustc_back::svh;
59+
pub use rustc_back::target_strs;
60+
pub use rustc_back::x86;
61+
pub use rustc_back::x86_64;
62+
63+
pub mod archive;
64+
pub mod link;
65+
pub mod lto;
66+
pub mod rpath;
67+
68+
}
69+
>>>>>>> Extract librustc_back from librustc
70+
5271
pub mod middle {
5372
pub mod def;
5473
pub mod trans;
@@ -97,21 +116,6 @@ pub mod front {
97116
pub mod show_span;
98117
}
99118

100-
pub mod back {
101-
pub mod abi;
102-
pub mod archive;
103-
pub mod arm;
104-
pub mod link;
105-
pub mod lto;
106-
pub mod mips;
107-
pub mod mipsel;
108-
pub mod rpath;
109-
pub mod svh;
110-
pub mod target_strs;
111-
pub mod x86;
112-
pub mod x86_64;
113-
}
114-
115119
pub mod metadata;
116120

117121
pub mod driver;

branches/try/src/librustc/back/arm.rs renamed to branches/try/src/librustc_back/arm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use back::target_strs;
11+
use target_strs;
1212
use syntax::abi;
1313

1414
pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {

branches/try/src/librustc_back/lib.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![crate_id = "rustc_back#0.11.0-pre"]
12+
#![crate_name = "rustc_back"]
13+
#![experimental]
14+
#![comment = "The Rust compiler backend"]
15+
#![license = "MIT/ASL2"]
16+
#![crate_type = "dylib"]
17+
#![crate_type = "rlib"]
18+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
19+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
20+
html_root_url = "http://doc.rust-lang.org/")]
21+
22+
#![feature(globs)]
23+
#![feature(phase)]
24+
#![allow(unused_attribute)] // NOTE: remove after stage0
25+
26+
#[phase(plugin, link)]
27+
extern crate log;
28+
extern crate syntax;
29+
extern crate libc;
30+
extern crate flate;
31+
32+
pub mod abi;
33+
pub mod arm;
34+
pub mod mips;
35+
pub mod mipsel;
36+
pub mod svh;
37+
pub mod target_strs;
38+
pub mod x86;
39+
pub mod x86_64;

branches/try/src/librustc/back/mips.rs renamed to branches/try/src/librustc_back/mips.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use back::target_strs;
11+
use target_strs;
1212
use syntax::abi;
1313

1414
pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {

branches/try/src/librustc/back/mipsel.rs renamed to branches/try/src/librustc_back/mipsel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use back::target_strs;
11+
use target_strs;
1212
use syntax::abi;
1313

1414
pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {

branches/try/src/librustc/back/svh.rs renamed to branches/try/src/librustc_back/svh.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ use std::iter::range_step;
5353
use syntax::ast;
5454
use syntax::visit;
5555

56-
use driver::session::Session;
57-
5856
#[deriving(Clone, PartialEq)]
5957
pub struct Svh {
6058
hash: String,
@@ -70,7 +68,7 @@ impl Svh {
7068
self.hash.as_slice()
7169
}
7270

73-
pub fn calculate(sess: &Session, krate: &ast::Crate) -> Svh {
71+
pub fn calculate(metadata: &Vec<String>, krate: &ast::Crate) -> Svh {
7472
// FIXME (#14132): This is better than it used to be, but it still not
7573
// ideal. We now attempt to hash only the relevant portions of the
7674
// Crate AST as well as the top-level crate attributes. (However,
@@ -82,7 +80,7 @@ impl Svh {
8280
// avoid collisions.
8381
let mut state = SipState::new();
8482

85-
for data in sess.opts.cg.metadata.iter() {
83+
for data in metadata.iter() {
8684
data.hash(&mut state);
8785
}
8886

branches/try/src/librustc/back/x86.rs renamed to branches/try/src/librustc_back/x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
use back::target_strs;
12+
use target_strs;
1313
use syntax::abi;
1414

1515
pub fn get_target_strs(target_triple: String, target_os: abi::Os)

branches/try/src/librustc/back/x86_64.rs renamed to branches/try/src/librustc_back/x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
use back::target_strs;
12+
use target_strs;
1313
use syntax::abi;
1414

1515
pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {

0 commit comments

Comments
 (0)