pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
    println!("Dist analysis");

    if build.config.channel != "nightly" {
        println!("\tskipping - not on nightly channel");
        return;
    }
    if compiler.host != build.config.build {
        println!("\tskipping - not a build host");
        return
    }
    if compiler.stage != 2 {
        println!("\tskipping - not stage2");
        return
    }

    // Package save-analysis from stage1 if not doing a full bootstrap, as the
    // stage2 artifacts is simply copied from stage1 in that case.
    let compiler = if build.force_use_stage1(compiler, target) {
        Compiler::new(1, compiler.host)
    } else {
        compiler.clone()
    };

    let name = pkgname(build, "rust-analysis");
    let image = tmpdir(build).join(format!("{}-{}-image", name, target));

    let src = build.stage_out(&compiler, Mode::Libstd).join(target).join("release").join("deps");

    let image_src = src.join("save-analysis");
    let dst = image.join("lib/rustlib").join(target).join("analysis");
    t!(fs::create_dir_all(&dst));
    cp_r(&image_src, &dst);

    let mut cmd = Command::new("sh");
    cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
       .arg("--product-name=Rust")
       .arg("--rel-manifest-dir=rustlib")
       .arg("--success-message=save-analysis-saved.")
       .arg(format!("--image-dir={}", sanitize_sh(&image)))
       .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
       .arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
       .arg(format!("--package-name={}-{}", name, target))
       .arg(format!("--component-name=rust-analysis-{}", target))
       .arg("--legacy-manifest-dirs=rustlib,cargo");
    build.run(&mut cmd);
    t!(fs::remove_dir_all(&image));
}
/// Creates a tarball of save-analysis metadata, if available.
Creates a tarball of save-analysis metadata, if available.
Creates a tarball of save - analysis metadata if available .
pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
    println!("Dist analysis");
    if build.config.channel != "nightly" {
        println!("\tskipping - not on nightly channel");
        return;
    }
    if compiler.host != build.config.build {
        println!("\tskipping - not a build host");
        return
    }
    if compiler.stage != 2 {
        println!("\tskipping - not stage2");
        return
    }
    // Package save-analysis from stage1 if not doing a full bootstrap, as the
    // stage2 artifacts is simply copied from stage1 in that case.
    let compiler = if build.force_use_stage1(compiler, target) {
        Compiler::new(1, compiler.host)
    } else {
        compiler.clone()
    };
    let name = pkgname(build, "rust-analysis");
    let image = tmpdir(build).join(format!("{}-{}-image", name, target));
    let src = build.stage_out(&compiler, Mode::Libstd).join(target).join("release").join("deps");
    let image_src = src.join("save-analysis");
    let dst = image.join("lib/rustlib").join(target).join("analysis");
    t!(fs::create_dir_all(&dst));
    cp_r(&image_src, &dst);
    let mut cmd = Command::new("sh");
    cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
       .arg("--product-name=Rust")
       .arg("--rel-manifest-dir=rustlib")
       .arg("--success-message=save-analysis-saved.")
       .arg(format!("--image-dir={}", sanitize_sh(&image)))
       .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
       .arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
       .arg(format!("--package-name={}-{}", name, target))
       .arg(format!("--component-name=rust-analysis-{}", target))
       .arg("--legacy-manifest-dirs=rustlib,cargo");
    build.run(&mut cmd);
    t!(fs::remove_dir_all(&image));
}
pub fn analysis ( build : & Build , compiler : & Compiler , target : & str ) { println ! ( " " ) ; if build . config . channel != " " { println ! ( " \t " ) ; return ; } if compiler . host != build . config . build { println ! ( " \t " ) ; return } if compiler . stage != 2 { println ! ( " \t " ) ; return } // Package save-analysis from stage1 if not doing a full bootstrap, as the // stage2 artifacts is simply copied from stage1 in that case. let compiler = if build . force_use_stage1 ( compiler , target ) { Compiler :: new ( 1 , compiler . host ) } else { compiler . clone ( ) } ; let name = pkgname ( build , " " ) ; let image = tmpdir ( build ) . join ( format ! ( " " name target ) ) ; let src = build . stage_out ( & compiler , Mode :: Libstd ) . join ( target ) . join ( " " ) . join ( " " ) ; let image_src = src . join ( " " ) ; let dst = image . join ( " " ) . join ( target ) . join ( " " ) ; t ! ( fs create_dir_all ( dst ) ) ; cp_r ( & image_src , & dst ) ; let mut cmd = Command :: new ( " " ) ; cmd . arg ( sanitize_sh ( & build . src . join ( " " ) ) ) . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( format ! ( " " sanitize_sh ( image ) ) ) . arg ( format ! ( " " sanitize_sh ( tmpdir ( build ) ) ) ) . arg ( format ! ( " " sanitize_sh ( distdir ( build ) ) ) ) . arg ( format ! ( " " name target ) ) . arg ( format ! ( " " target ) ) . arg ( " " ) ; build . run ( & mut cmd ) ; t ! ( fs remove_dir_all ( image ) ) ; }
Creates a tarball of save-analysis metadata, if available.
Creates a tarball of save - analysis metadata if available .
build
&Build
compiler
&Compiler
target
&str
build
&Build
compiler
&Compiler
target
&str