Skip to content

Commit 182b933

Browse files
committed
rustc: Link with main.o
1 parent 00eb3f5 commit 182b933

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/comp/driver/rustc.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ fn main(vec[str] args) {
434434

435435
//FIXME: Should we make the 'stage3's variable here?
436436
let str glu = "stage3/glue.o";
437+
let str main = "rt/main.o";
437438
let str stage = "-Lstage3";
438439
let vec[str] gcc_args;
439440
let str prog = "gcc";
@@ -450,21 +451,21 @@ fn main(vec[str] args) {
450451
exe_suffix = ".exe";
451452
gcc_args = common_cflags + [
452453
"-march=i686", "-O2",
453-
glu, "-o",
454+
glu, main, "-o",
454455
saved_out_filename + exe_suffix,
455456
saved_out_filename + ".o"] + common_libs;
456457
}
457458
case (session::os_macos) {
458459
gcc_args = common_cflags + [
459460
"-arch i386", "-O0", "-m32",
460-
glu, "-o",
461+
glu, main, "-o",
461462
saved_out_filename + exe_suffix,
462463
saved_out_filename + ".o"] + common_libs;
463464
}
464465
case (session::os_linux) {
465466
gcc_args = common_cflags + [
466467
"-march=i686", "-O2", "-m32",
467-
glu, "-o",
468+
glu, main, "-o",
468469
saved_out_filename + exe_suffix,
469470
saved_out_filename + ".o"] + common_libs;
470471
}

0 commit comments

Comments
 (0)