/// Link all libstd rlibs/dylibs into the sysroot location.
///
/// Links those artifacts generated in the given `stage` for `target` produced
/// by `compiler` into `host`'s sysroot.
Link all libstd rlibs/dylibs into the sysroot location.
Link all libstd rlibs / dylibs into the sysroot location .
pub fn std_link(build: &Build,
                target: &str,
                compiler: &Compiler,
                host: &str) {
    let target_compiler = Compiler::new(compiler.stage, host);
    let libdir = build.sysroot_libdir(&target_compiler, target);
    let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
    // If we're linking one compiler host's output into another, then we weren't
    // called from the `std` method above. In that case we clean out what's
    // already there.
    if host != compiler.host {
        let _ = fs::remove_dir_all(&libdir);
        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, &libdir);
    }
}
pub fn std_link ( build : & Build , target : & str , compiler : & Compiler , host : & str ) { let target_compiler = Compiler :: new ( compiler . stage , host ) ; let libdir = build . sysroot_libdir ( & target_compiler , target ) ; let out_dir = build . cargo_out ( compiler , Mode :: Libstd , target ) ; // If we're linking one compiler host's output into another, then we weren't // called from the `std` method above. In that case we clean out what's // already there. if host != compiler . host { let _ = fs :: remove_dir_all ( & libdir ) ; t ! ( fs create_dir_all ( libdir ) ) ; } add_to_sysroot ( & out_dir , & libdir ) ; if target . contains ( " " ) && ! target . contains ( " " ) { copy_musl_third_party_objects ( build , & libdir ) ; } }
Link all libstd rlibs/dylibs into the sysroot location.
Link all libstd rlibs / dylibs into the sysroot location .
build
&Build
target
&str
compiler
&Compiler
host
&str