File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -421,8 +421,20 @@ fn main(vec[str] args) {
421
421
compile_input ( sess, env, ifile, ofile) ;
422
422
}
423
423
case ( some ( ?ofile) ) {
424
+ // FIXME: what about windows? This will create a foo.exe.o.
424
425
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) ;
426
438
}
427
439
}
428
440
@@ -431,11 +443,10 @@ fn main(vec[str] args) {
431
443
//
432
444
// TODO: Factor this out of main.
433
445
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" ;
437
448
let str main = "rt/main.o" ;
438
- let str stage = "-Lstage3" ;
449
+ let str stage = "-L" + binary_dir ;
439
450
let vec[ str] gcc_args;
440
451
let str prog = "gcc" ;
441
452
let str exe_suffix = "" ;
You can’t perform that action at this time.
0 commit comments