pub fn std(build: &Build, target: &str, compiler: &Compiler) {
    let libdir = build.sysroot_libdir(compiler, target);
    t!(fs::create_dir_all(&libdir));

    println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
             compiler.host, target);

    let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
    build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
    let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
    let mut features = build.std_features();
    // When doing a local rebuild we tell cargo that we're stage1 rather than
    // stage0. This works fine if the local rust and being-built rust have the
    // same view of what the default allocator is, but fails otherwise. Since
    // we don't have a way to express an allocator preference yet, work
    // around the issue in the case of a local rebuild with jemalloc disabled.
    if compiler.stage == 0 && build.local_rebuild && !build.config.use_jemalloc {
        features.push_str(" force_alloc_system");
    }
    cargo.arg("--features").arg(features)
         .arg("--manifest-path")
         .arg(build.src.join("src/rustc/std_shim/Cargo.toml"));

    if let Some(target) = build.config.target_config.get(target) {
        if let Some(ref jemalloc) = target.jemalloc {
            cargo.env("JEMALLOC_OVERRIDE", jemalloc);
        }
    }
    if target.contains("musl") {
        if let Some(p) = build.musl_root(target) {
            cargo.env("MUSL_ROOT", p);
        }
    }

    build.run(&mut cargo);
    update_mtime(build, &libstd_stamp(build, &compiler, target));
}
/// Build the standard library.
///
/// This will build the standard library for a particular stage of the build
/// using the `compiler` targeting the `target` architecture. The artifacts
/// created will also be linked into the sysroot directory.
Build the standard library.
This will build the standard library for a particular stage of the build
using the `compiler` targeting the `target` architecture. The artifacts
created will also be linked into the sysroot directory.
Build the standard library . This will build the standard library for a particular stage of the build using the ` compiler ` targeting the ` target ` architecture . The artifacts created will also be linked into the sysroot directory .
pub fn std(build: &Build, target: &str, compiler: &Compiler) {
    let libdir = build.sysroot_libdir(compiler, target);
    t!(fs::create_dir_all(&libdir));
    println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
             compiler.host, target);
    let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
    build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
    let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
    let mut features = build.std_features();
    // When doing a local rebuild we tell cargo that we're stage1 rather than
    // stage0. This works fine if the local rust and being-built rust have the
    // same view of what the default allocator is, but fails otherwise. Since
    // we don't have a way to express an allocator preference yet, work
    // around the issue in the case of a local rebuild with jemalloc disabled.
    if compiler.stage == 0 && build.local_rebuild && !build.config.use_jemalloc {
        features.push_str(" force_alloc_system");
    }
    cargo.arg("--features").arg(features)
         .arg("--manifest-path")
         .arg(build.src.join("src/rustc/std_shim/Cargo.toml"));
    if let Some(target) = build.config.target_config.get(target) {
        if let Some(ref jemalloc) = target.jemalloc {
            cargo.env("JEMALLOC_OVERRIDE", jemalloc);
        }
    }
    if target.contains("musl") {
        if let Some(p) = build.musl_root(target) {
            cargo.env("MUSL_ROOT", p);
        }
    }
    build.run(&mut cargo);
    update_mtime(build, &libstd_stamp(build, &compiler, target));
}
pub fn std ( build : & Build , target : & str , compiler : & Compiler ) { let libdir = build . sysroot_libdir ( compiler , target ) ; t ! ( fs create_dir_all ( libdir ) ) ; println ! ( " " compiler stage compiler host target ) ; let out_dir = build . cargo_out ( compiler , Mode :: Libstd , target ) ; build . clear_if_dirty ( & out_dir , & build . compiler_path ( compiler ) ) ; let mut cargo = build . cargo ( compiler , Mode :: Libstd , target , " " ) ; let mut features = build . std_features ( ) ; // When doing a local rebuild we tell cargo that we're stage1 rather than // stage0. This works fine if the local rust and being-built rust have the // same view of what the default allocator is, but fails otherwise. Since // we don't have a way to express an allocator preference yet, work // around the issue in the case of a local rebuild with jemalloc disabled. if compiler . stage == 0 && build . local_rebuild && ! build . config . use_jemalloc { features . push_str ( " " ) ; } cargo . arg ( " " ) . arg ( features ) . arg ( " " ) . arg ( build . src . join ( " " ) ) ; if let Some ( target ) = build . config . target_config . get ( target ) { if let Some ( ref jemalloc ) = target . jemalloc { cargo . env ( " " , jemalloc ) ; } } if target . contains ( " " ) { if let Some ( p ) = build . musl_root ( target ) { cargo . env ( " " , p ) ; } } build . run ( & mut cargo ) ; update_mtime ( build , & libstd_stamp ( build , & compiler , target ) ) ; }
Build the standard library.
Build the standard library .
build
&Build
target
&str
compiler
&Compiler
build
&Build
target
&str
compiler
&Compiler