Don't rely on main.ll anymore

I'll remove the actual file after I register a snapshot.

Issue #992
This commit is contained in:
Marijn Haverbeke 2011-10-20 13:48:10 +02:00
parent cff9c67674
commit ef63f09dcd
5 changed files with 63 additions and 47 deletions

View file

@ -503,12 +503,6 @@ fn mangle_internal_name_by_seq(ccx: @crate_ctxt, flav: str) -> str {
// gcc to link the object file with some libs
fn link_binary(sess: session::session,
saved_out_filename: str) {
let main: str = alt filesearch::search(
sess.filesearch(), bind filesearch::pick_file("main.o", _)) {
option::some(f) { f }
option::none. { sess.fatal("can't find main.o") }
};
// The default library location, we need this to find the runtime.
// The location of crates will be determined as needed.
let stage: str = "-L" + sess.filesearch().get_target_lib_path();
@ -579,7 +573,7 @@ fn link_binary(sess: session::session,
}
} else {
// FIXME: why do we hardcode -lm?
gcc_args += ["-lm", main];
gcc_args += ["-lm"];
}