Skip to content

Commit d27a514

Browse files
committed
---
yaml --- r: 147708 b: refs/heads/try2 c: f62faa8 h: refs/heads/master v: v3
1 parent 48905a2 commit d27a514

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: e4815b6c3f6b22fc41d4d04c28be4f3484f8099f
8+
refs/heads/try2: f62faa89edb16a340a0be471037301ebf1457919
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ pub mod write {
208208
// Emit the bytecode if we're either saving our temporaries or
209209
// emitting an rlib. Whenever an rlib is create, the bytecode is
210210
// inserted into the archive in order to allow LTO against it.
211+
let outputs = sess.outputs.borrow();
211212
if sess.opts.save_temps ||
212-
sess.outputs.iter().any(|&o| o == session::OutputRlib) {
213+
outputs.get().iter().any(|&o| o == session::OutputRlib) {
213214
output.with_extension("bc").with_c_str(|buf| {
214215
llvm::LLVMWriteBitcodeToFile(llmod, buf);
215216
})
@@ -745,7 +746,8 @@ pub fn link_binary(sess: Session,
745746
out_filename: &Path,
746747
lm: &LinkMeta) -> ~[Path] {
747748
let mut out_filenames = ~[];
748-
for &output in sess.outputs.iter() {
749+
let outputs = sess.outputs.borrow();
750+
for &output in outputs.get().iter() {
749751
let out_file = link_binary_output(sess, trans, output, obj_filename,
750752
out_filename, lm);
751753
out_filenames.push(out_file);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ use std::libc;
2020
pub fn run(sess: session::Session, llmod: ModuleRef,
2121
tm: TargetMachineRef, reachable: &[~str]) {
2222
// Make sure we actually can run LTO
23-
for output in sess.outputs.iter() {
23+
let outputs = sess.outputs.borrow();
24+
for output in outputs.get().iter() {
2425
match *output {
2526
session::OutputExecutable | session::OutputStaticlib => {}
2627
_ => {

branches/try2/src/librustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub fn phase_2_configure_and_expand(sess: Session,
167167
let time_passes = sess.time_passes();
168168

169169
sess.building_library.set(session::building_library(sess.opts, &crate));
170-
*sess.outputs = session::collect_outputs(sess.opts, crate.attrs);
170+
sess.outputs.set(session::collect_outputs(sess.opts, crate.attrs));
171171

172172
time(time_passes, "gated feature checking", (), |_|
173173
front::feature_gate::check_crate(sess, &crate));
@@ -882,7 +882,7 @@ pub fn build_session_(sopts: @session::options,
882882
working_dir: os::getcwd(),
883883
lints: RefCell::new(HashMap::new()),
884884
node_id: Cell::new(1),
885-
outputs: @mut ~[],
885+
outputs: @RefCell::new(~[]),
886886
}
887887
}
888888

branches/try2/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ pub struct Session_ {
215215
lints: RefCell<HashMap<ast::NodeId,
216216
~[(lint::lint, codemap::Span, ~str)]>>,
217217
node_id: Cell<ast::NodeId>,
218-
outputs: @mut ~[OutputStyle],
218+
outputs: @RefCell<~[OutputStyle]>,
219219
}
220220

221221
pub type Session = @Session_;

0 commit comments

Comments
 (0)