Skip to content

Commit b859d1c

Browse files
z0w0brson
authored andcommitted
---
yaml --- r: 32311 b: refs/heads/dist-snap c: 638db28 h: refs/heads/master i: 32309: 207273a 32307: 2a00086 32303: 4ce2063 v: v3
1 parent 559058b commit b859d1c

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: efb576a60dbd12cdd9c732cb5d8b202283b9864a
10+
refs/heads/dist-snap: 638db28c472c1edadc3c37f900df28f14cca7665
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ fn run_rfail_test(config: config, props: test_props, testfile: &Path) {
5151
let procres = if !config.jit {
5252
let procres = compile_test(config, props, testfile);
5353

54-
if procres.status != 0 { fatal_procres(~"compilation failed!", procres); }
54+
if procres.status != 0 {
55+
fatal_procres(~"compilation failed!", procres);
56+
}
5557
5658
exec_compiled_test(config, props, testfile)
5759
} else {
@@ -83,11 +85,15 @@ fn run_rpass_test(config: config, props: test_props, testfile: &Path) {
8385
if !config.jit {
8486
let mut procres = compile_test(config, props, testfile);
8587

86-
if procres.status != 0 { fatal_procres(~"compilation failed!", procres); }
88+
if procres.status != 0 {
89+
fatal_procres(~"compilation failed!", procres);
90+
}
8791
8892
procres = exec_compiled_test(config, props, testfile);
8993
90-
if procres.status != 0 { fatal_procres(~"test run failed!", procres); }
94+
if procres.status != 0 {
95+
fatal_procres(~"test run failed!", procres);
96+
}
9197
} else {
9298
let mut procres = jit_test(config, props, testfile);
9399

branches/dist-snap/src/rustc/back/link.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,19 @@ mod jit {
8585
m: ModuleRef,
8686
opt: c_int,
8787
stacks: bool) unsafe {
88-
let ptr = llvm::LLVMRustJIT(rusti::morestack_addr(), pm, m, opt, stacks);
88+
let ptr = llvm::LLVMRustJIT(rusti::morestack_addr(),
89+
pm, m, opt, stacks);
8990

9091
if ptr::is_null(ptr) {
9192
llvm_err(sess, ~"Could not JIT");
9293
} else {
93-
let bin = match os::self_exe_path() {
94-
Some(path) => path.to_str(),
95-
_ => ~"rustc"
96-
};
9794
let closure = Closure {
9895
code: ptr,
9996
env: ptr::null()
10097
};
10198
let func: fn(~[~str]) = unsafe::transmute(closure);
10299

103-
func(~[bin]);
100+
func(~[sess.opts.binary]);
104101
}
105102
}
106103
}

branches/dist-snap/src/rustc/driver/driver.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ fn host_triple() -> ~str {
428428
};
429429
}
430430

431-
fn build_session_options(matches: getopts::Matches,
431+
fn build_session_options(binary: ~str,
432+
matches: getopts::Matches,
432433
demitter: diagnostic::emitter) -> @session::options {
433434
let crate_type = if opt_present(matches, ~"lib") {
434435
session::lib_crate
@@ -553,6 +554,7 @@ fn build_session_options(matches: getopts::Matches,
553554
maybe_sysroot: sysroot_opt,
554555
target_triple: target,
555556
cfg: cfg,
557+
binary: binary,
556558
test: test,
557559
parse_only: parse_only,
558560
no_trans: no_trans,
@@ -736,7 +738,8 @@ mod test {
736738
Err(f) => fail ~"test_switch_implies_cfg_test: " +
737739
getopts::fail_str(f)
738740
};
739-
let sessopts = build_session_options(matches, diagnostic::emit);
741+
let sessopts = build_session_options(
742+
~"rustc", matches, diagnostic::emit);
740743
let sess = build_session(sessopts, diagnostic::emit);
741744
let cfg = build_configuration(sess, ~"whatever", str_input(~""));
742745
assert (attr::contains_name(cfg, ~"test"));
@@ -754,7 +757,8 @@ mod test {
754757
getopts::fail_str(f);
755758
}
756759
};
757-
let sessopts = build_session_options(matches, diagnostic::emit);
760+
let sessopts = build_session_options(
761+
~"rustc", matches, diagnostic::emit);
758762
let sess = build_session(sessopts, diagnostic::emit);
759763
let cfg = build_configuration(sess, ~"whatever", str_input(~""));
760764
let test_items = attr::find_meta_items_by_name(cfg, ~"test");

branches/dist-snap/src/rustc/driver/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ fn run_compiler(args: ~[~str], demitter: diagnostic::emitter) {
166166
_ => early_error(demitter, ~"multiple input filenames provided")
167167
};
168168
169-
let sopts = build_session_options(matches, demitter);
169+
let sopts = build_session_options(binary, matches, demitter);
170170
let sess = build_session(sopts, demitter);
171171
let odir = getopts::opt_maybe_str(matches, ~"out-dir");
172172
let odir = option::map(odir, |o| Path(o));

branches/dist-snap/src/rustc/driver/session.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ type options =
114114
maybe_sysroot: Option<Path>,
115115
target_triple: ~str,
116116
cfg: ast::crate_cfg,
117+
binary: ~str,
117118
test: bool,
118119
parse_only: bool,
119120
no_trans: bool,
@@ -256,6 +257,7 @@ fn basic_options() -> @options {
256257
maybe_sysroot: None,
257258
target_triple: driver::host_triple(),
258259
cfg: ~[],
260+
binary: ~"rustc",
259261
test: false,
260262
parse_only: false,
261263
no_trans: false,

0 commit comments

Comments
 (0)