Lines 485-491
impl Step for Rustc {
Link Here
|
485 |
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target)); |
485 |
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target)); |
486 |
|
486 |
|
487 |
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build"); |
487 |
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build"); |
488 |
rustc_cargo(build, &compiler, target, &mut cargo); |
488 |
rustc_cargo(build, target, &mut cargo); |
489 |
run_cargo(build, |
489 |
run_cargo(build, |
490 |
&mut cargo, |
490 |
&mut cargo, |
491 |
&librustc_stamp(build, compiler, target)); |
491 |
&librustc_stamp(build, compiler, target)); |
Lines 500-506
impl Step for Rustc {
Link Here
|
500 |
|
500 |
|
501 |
/// Same as `std_cargo`, but for libtest |
501 |
/// Same as `std_cargo`, but for libtest |
502 |
pub fn rustc_cargo(build: &Build, |
502 |
pub fn rustc_cargo(build: &Build, |
503 |
compiler: &Compiler, |
|
|
504 |
target: Interned<String>, |
503 |
target: Interned<String>, |
505 |
cargo: &mut Command) { |
504 |
cargo: &mut Command) { |
506 |
cargo.arg("--features").arg(build.rustc_features()) |
505 |
cargo.arg("--features").arg(build.rustc_features()) |
Lines 514-526
pub fn rustc_cargo(build: &Build,
Link Here
|
514 |
.env("CFG_VERSION", build.rust_version()) |
513 |
.env("CFG_VERSION", build.rust_version()) |
515 |
.env("CFG_PREFIX", build.config.prefix.clone().unwrap_or_default()); |
514 |
.env("CFG_PREFIX", build.config.prefix.clone().unwrap_or_default()); |
516 |
|
515 |
|
517 |
if compiler.stage == 0 { |
516 |
let libdir_relative = |
518 |
cargo.env("CFG_LIBDIR_RELATIVE", "lib"); |
517 |
build.config.libdir.clone().unwrap_or(PathBuf::from("lib")); |
519 |
} else { |
518 |
cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative); |
520 |
let libdir_relative = |
|
|
521 |
build.config.libdir_relative.clone().unwrap_or(PathBuf::from("lib")); |
522 |
cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative); |
523 |
} |
524 |
|
519 |
|
525 |
// If we're not building a compiler with debugging information then remove |
520 |
// If we're not building a compiler with debugging information then remove |
526 |
// these two env vars which would be set otherwise. |
521 |
// these two env vars which would be set otherwise. |