mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
Enough driver support to link an empty program on linux. Will
try to update the Makefiles to use it.
This commit is contained in:
parent
913383d775
commit
eb811a903f
@ -421,8 +421,20 @@ fn main(vec[str] args) {
|
|||||||
compile_input(sess, env, ifile, ofile);
|
compile_input(sess, env, ifile, ofile);
|
||||||
}
|
}
|
||||||
case (some(?ofile)) {
|
case (some(?ofile)) {
|
||||||
|
// FIXME: what about windows? This will create a foo.exe.o.
|
||||||
saved_out_filename = ofile;
|
saved_out_filename = ofile;
|
||||||
compile_input(sess, env, ifile, ofile);
|
auto temp_filename;
|
||||||
|
alt (sopts.output_type) {
|
||||||
|
case (link::output_type_exe) {
|
||||||
|
// FIXME: what about shared?
|
||||||
|
temp_filename = ofile + ".o";
|
||||||
|
}
|
||||||
|
case (_) {
|
||||||
|
temp_filename = ofile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compile_input(sess, env, ifile, temp_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,11 +443,10 @@ fn main(vec[str] args) {
|
|||||||
//
|
//
|
||||||
// TODO: Factor this out of main.
|
// TODO: Factor this out of main.
|
||||||
if (sopts.output_type == link::output_type_exe) {
|
if (sopts.output_type == link::output_type_exe) {
|
||||||
|
auto binary_dir = fs::dirname(binary);
|
||||||
//FIXME: Should we make the 'stage3's variable here?
|
let str glu = binary_dir + "/glue.o";
|
||||||
let str glu = "stage3/glue.o";
|
|
||||||
let str main = "rt/main.o";
|
let str main = "rt/main.o";
|
||||||
let str stage = "-Lstage3";
|
let str stage = "-L" + binary_dir;
|
||||||
let vec[str] gcc_args;
|
let vec[str] gcc_args;
|
||||||
let str prog = "gcc";
|
let str prog = "gcc";
|
||||||
let str exe_suffix = "";
|
let str exe_suffix = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user