/// Build and prepare startup objects like rsbegin.o and rsend.o
///
/// These are primarily used on Windows right now for linking executables/dlls.
/// They don't require any library support as they're just plain old object
/// files, so we just use the nightly snapshot compiler to always build them (as
/// no other compilers are guaranteed to be available).
Build and prepare startup objects like rsbegin.o and rsend.o
These are primarily used on Windows right now for linking executables/dlls.
They don't require any library support as they're just plain old object
files, so we just use the nightly snapshot compiler to always build them (as
no other compilers are guaranteed to be available).
Build and prepare startup objects like rsbegin . o and rsend . o These are primarily used on Windows right now for linking executables / dlls . They don ' t require any library support as they ' re just plain old object files so we just use the nightly snapshot compiler to always build them ( as no other compilers are guaranteed to be available ) .
fn build_startup_objects(build: &Build, target: &str, into: &Path) {
    if !target.contains("pc-windows-gnu") {
        return
    }
    let compiler = Compiler::new(0, &build.config.build);
    let compiler = build.compiler_path(&compiler);
    for file in t!(fs::read_dir(build.src.join("src/rtstartup"))) {
        let file = t!(file);
        build.run(Command::new(&compiler)
                          .arg("--emit=obj")
                          .arg("--out-dir").arg(into)
                          .arg(file.path()));
    }
    for obj in ["crt2.o", "dllcrt2.o"].iter() {
        copy(&compiler_file(build.cc(target), obj), &into.join(obj));
    }
}
fn build_startup_objects ( build : & Build , target : & str , into : & Path ) { if ! target . contains ( " " ) { return } let compiler = Compiler :: new ( 0 , & build . config . build ) ; let compiler = build . compiler_path ( & compiler ) ; for file in t ! ( fs read_dir ( build src join ( " " ) ) ) { let file = t ! ( file ) ; build . run ( Command :: new ( & compiler ) . arg ( " " ) . arg ( " " ) . arg ( into ) . arg ( file . path ( ) ) ) ; } for obj in [ " " , " " ] . iter ( ) { copy ( & compiler_file ( build . cc ( target ) , obj ) , & into . join ( obj ) ) ; } }
Build and prepare startup objects like rsbegin.o and rsend.o
These are primarily used on Windows right now for linking executables/dlls.
Build and prepare startup objects like rsbegin . o and rsend . o These are primarily used on Windows right now for linking executables / dlls .
build
&Build
target
&str
into
&Path