pub fn std_link(build: &Build,
                compiler: &Compiler,
                target_compiler: &Compiler,
                target: &str) {
    println!("Copying stage{} std from stage{} ({} -> {} / {})",
             target_compiler.stage,
             compiler.stage,
             compiler.host,
             target_compiler.host,
             target);
    let libdir = build.sysroot_libdir(&target_compiler, target);
    let out_dir = build.cargo_out(&compiler, Mode::Libstd, target);

    t!(fs::create_dir_all(&libdir));
    add_to_sysroot(&out_dir, &libdir);

    if target.contains("musl") && !target.contains("mips") {
        copy_musl_third_party_objects(build, target, &libdir);
    }

    if build.config.sanitizers && compiler.stage != 0 && target == "x86_64-apple-darwin" {
        // The sanitizers are only built in stage1 or above, so the dylibs will
        // be missing in stage0 and causes panic. See the `std()` function above
        // for reason why the sanitizers are not built in stage0.
        copy_apple_sanitizer_dylibs(&build.native_dir(target), "osx", &libdir);
    }
}
/// Link all libstd rlibs/dylibs into the sysroot location.
///
/// Links those artifacts generated by `compiler` to a the `stage` compiler's
/// sysroot for the specified `host` and `target`.
///
/// Note that this assumes that `compiler` has already generated the libstd
/// libraries for `target`, and this method will find them in the relevant
/// output directory.
Link all libstd rlibs/dylibs into the sysroot location.

Note that this assumes that `compiler` has already generated the libstd
libraries for `target`, and this method will find them in the relevant
output directory.
Link all libstd rlibs / dylibs into the sysroot location . Note that this assumes that ` compiler ` has already generated the libstd libraries for ` target ` and this method will find them in the relevant output directory .
pub fn std_link(build: &Build,
                compiler: &Compiler,
                target_compiler: &Compiler,
                target: &str) {
    println!("Copying stage{} std from stage{} ({} -> {} / {})",
             target_compiler.stage,
             compiler.stage,
             compiler.host,
             target_compiler.host,
             target);
    let libdir = build.sysroot_libdir(&target_compiler, target);
    let out_dir = build.cargo_out(&compiler, Mode::Libstd, target);
    t!(fs::create_dir_all(&libdir));
    add_to_sysroot(&out_dir, &libdir);
    if target.contains("musl") && !target.contains("mips") {
        copy_musl_third_party_objects(build, target, &libdir);
    }
    if build.config.sanitizers && compiler.stage != 0 && target == "x86_64-apple-darwin" {
        // The sanitizers are only built in stage1 or above, so the dylibs will
        // be missing in stage0 and causes panic. See the `std()` function above
        // for reason why the sanitizers are not built in stage0.
        copy_apple_sanitizer_dylibs(&build.native_dir(target), "osx", &libdir);
    }
}
pub fn std_link ( build : & Build , compiler : & Compiler , target_compiler : & Compiler , target : & str ) { println ! ( " " target_compiler stage compiler stage compiler host target_compiler host target ) ; let libdir = build . sysroot_libdir ( & target_compiler , target ) ; let out_dir = build . cargo_out ( & compiler , Mode :: Libstd , target ) ; t ! ( fs create_dir_all ( libdir ) ) ; add_to_sysroot ( & out_dir , & libdir ) ; if target . contains ( " " ) && ! target . contains ( " " ) { copy_musl_third_party_objects ( build , target , & libdir ) ; } if build . config . sanitizers && compiler . stage != 0 && target == " " { // The sanitizers are only built in stage1 or above, so the dylibs will // be missing in stage0 and causes panic. See the `std()` function above // for reason why the sanitizers are not built in stage0. copy_apple_sanitizer_dylibs ( & build . native_dir ( target ) , " " , & libdir ) ; } }
Link all libstd rlibs/dylibs into the sysroot location.
Link all libstd rlibs / dylibs into the sysroot location .
build
&Build
compiler
&Compiler
target_compiler
&Compiler
target
&str
build
&Build
compiler
&Compiler
target_compiler
&Compiler
target
&str