Skip to content

Commit 6cad3ff

Browse files
committed
---
yaml --- r: 3051 b: refs/heads/master c: eb811a9 h: refs/heads/master i: 3049: 08b9a15 3047: c55726a v: v3
1 parent 64d25e9 commit 6cad3ff

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 913383d7755e5336c29314ea36760e07353e9983
2+
refs/heads/master: eb811a903fb1856203a8e2233efe50cd36d2e5b4

trunk/src/comp/driver/rustc.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,20 @@ fn main(vec[str] args) {
421421
compile_input(sess, env, ifile, ofile);
422422
}
423423
case (some(?ofile)) {
424+
// FIXME: what about windows? This will create a foo.exe.o.
424425
saved_out_filename = ofile;
425-
compile_input(sess, env, ifile, ofile);
426+
auto temp_filename;
427+
alt (sopts.output_type) {
428+
case (link::output_type_exe) {
429+
// FIXME: what about shared?
430+
temp_filename = ofile + ".o";
431+
}
432+
case (_) {
433+
temp_filename = ofile;
434+
}
435+
}
436+
437+
compile_input(sess, env, ifile, temp_filename);
426438
}
427439
}
428440

@@ -431,11 +443,10 @@ fn main(vec[str] args) {
431443
//
432444
// TODO: Factor this out of main.
433445
if (sopts.output_type == link::output_type_exe) {
434-
435-
//FIXME: Should we make the 'stage3's variable here?
436-
let str glu = "stage3/glue.o";
446+
auto binary_dir = fs::dirname(binary);
447+
let str glu = binary_dir + "/glue.o";
437448
let str main = "rt/main.o";
438-
let str stage = "-Lstage3";
449+
let str stage = "-L" + binary_dir;
439450
let vec[str] gcc_args;
440451
let str prog = "gcc";
441452
let str exe_suffix = "";

0 commit comments

Comments
 (0)