/// Copies debugger scripts for `host` into the `sysroot` specified.
Copies debugger scripts for `host` into the `sysroot` specified.
Copies debugger scripts for ` host ` into the ` sysroot ` specified .
pub fn debugger_scripts(build: &Build,
                        sysroot: &Path,
                        host: &str) {
    let cp_debugger_script = |file: &str| {
        let dst = sysroot.join("lib/rustlib/etc");
        t!(fs::create_dir_all(&dst));
        install(&build.src.join("src/etc/").join(file), &dst, 0o644);
    };
    if host.contains("windows-msvc") {
        // no debugger scripts
    } else {
        cp_debugger_script("debugger_pretty_printers_common.py");
        // gdb debugger scripts
        install(&build.src.join("src/etc/rust-gdb"), &sysroot.join("bin"),
                0o755);
        cp_debugger_script("gdb_load_rust_pretty_printers.py");
        cp_debugger_script("gdb_rust_pretty_printing.py");
        // lldb debugger scripts
        install(&build.src.join("src/etc/rust-lldb"), &sysroot.join("bin"),
                0o755);
        cp_debugger_script("lldb_rust_formatters.py");
    }
}
pub fn debugger_scripts ( build : & Build , sysroot : & Path , host : & str ) { let cp_debugger_script = | file : & str | { let dst = sysroot . join ( " " ) ; t ! ( fs create_dir_all ( dst ) ) ; install ( & build . src . join ( " " ) . join ( file ) , & dst , 0o644 ) ; } ; if host . contains ( " " ) { // no debugger scripts } else { cp_debugger_script ( " " ) ; // gdb debugger scripts install ( & build . src . join ( " " ) , & sysroot . join ( " " ) , 0o755 ) ; cp_debugger_script ( " " ) ; cp_debugger_script ( " " ) ; // lldb debugger scripts install ( & build . src . join ( " " ) , & sysroot . join ( " " ) , 0o755 ) ; cp_debugger_script ( " " ) ; } }
Copies debugger scripts for `host` into the `sysroot` specified.
Copies debugger scripts for ` host ` into the ` sysroot ` specified .
build
&Build
sysroot
&Path
host
&str