/// Copies debugger scripts for `target` into the `sysroot` specified.
Copies debugger scripts for `target` into the `sysroot` specified.
Copies debugger scripts for ` target ` into the ` sysroot ` specified .
fn run(self, builder: &Builder) {
        let host = self.host;
        let sysroot = self.sysroot;
        let dst = sysroot.join("lib/rustlib/etc");
        t!(fs::create_dir_all(&dst));
        let cp_debugger_script = |file: &str| {
            builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
        };
        if host.contains("windows-msvc") {
            // windbg debugger scripts
            builder.install(&builder.src.join("src/etc/rust-windbg.cmd"), &sysroot.join("bin"),
                0o755);
            cp_debugger_script("natvis/intrinsic.natvis");
            cp_debugger_script("natvis/liballoc.natvis");
            cp_debugger_script("natvis/libcore.natvis");
        } else {
            cp_debugger_script("debugger_pretty_printers_common.py");
            // gdb debugger scripts
            builder.install(&builder.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
            builder.install(&builder.src.join("src/etc/rust-lldb"), &sysroot.join("bin"),
                    0o755);
            cp_debugger_script("lldb_rust_formatters.py");
        }
    }
fn run ( self , builder : & Builder ) { let host = self . host ; let sysroot = self . sysroot ; let dst = sysroot . join ( " " ) ; t ! ( fs create_dir_all ( dst ) ) ; let cp_debugger_script = | file : & str | { builder . install ( & builder . src . join ( " " ) . join ( file ) , & dst , 0o644 ) ; } ; if host . contains ( " " ) { // windbg debugger scripts builder . install ( & builder . src . join ( " " ) , & sysroot . join ( " " ) , 0o755 ) ; cp_debugger_script ( " " ) ; cp_debugger_script ( " " ) ; cp_debugger_script ( " " ) ; } else { cp_debugger_script ( " " ) ; // gdb debugger scripts builder . install ( & builder . src . join ( " " ) , & sysroot . join ( " " ) , 0o755 ) ; cp_debugger_script ( " " ) ; cp_debugger_script ( " " ) ; // lldb debugger scripts builder . install ( & builder . src . join ( " " ) , & sysroot . join ( " " ) , 0o755 ) ; cp_debugger_script ( " " ) ; } }
Copies debugger scripts for `target` into the `sysroot` specified.
Copies debugger scripts for ` target ` into the ` sysroot ` specified .
self
builder
&Builder