fn run(self, builder: &Builder) -> PathBuf {
        let compiler = self.compiler;
        let target = self.target;
        assert!(builder.config.extended);
        builder.info("Dist analysis");
        let name = pkgname(builder, "rust-analysis");

        if &compiler.host != builder.config.build {
            builder.info("\tskipping, not a build host");
            return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
        }

        builder.ensure(Std { compiler, target });

        // 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 builder.force_use_stage1(compiler, target) {
            builder.compiler(1, compiler.host)
        } else {
            compiler.clone()
        };

        let image = tmpdir(builder).join(format!("{}-{}-image", name, target));

        let src = builder.stage_out(compiler, Mode::Std)
            .join(target).join(builder.cargo_dir()).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));
        builder.info(&format!("image_src: {:?}, dst: {:?}", image_src, dst));
        builder.cp_r(&image_src, &dst);

        let mut cmd = rust_installer(builder);
        cmd.arg("generate")
           .arg("--product-name=Rust")
           .arg("--rel-manifest-dir=rustlib")
           .arg("--success-message=save-analysis-saved.")
           .arg("--image-dir").arg(&image)
           .arg("--work-dir").arg(&tmpdir(builder))
           .arg("--output-dir").arg(&distdir(builder))
           .arg(format!("--package-name={}-{}", name, target))
           .arg(format!("--component-name=rust-analysis-{}", target))
           .arg("--legacy-manifest-dirs=rustlib,cargo");
        builder.run(&mut cmd);
        builder.remove_dir(&image);
        distdir(builder).join(format!("{}-{}.tar.gz", name, target))
    }
/// 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 .
fn run(self, builder: &Builder) -> PathBuf {
        let compiler = self.compiler;
        let target = self.target;
        assert!(builder.config.extended);
        builder.info("Dist analysis");
        let name = pkgname(builder, "rust-analysis");
        if &compiler.host != builder.config.build {
            builder.info("\tskipping, not a build host");
            return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
        }
        builder.ensure(Std { compiler, target });
        // 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 builder.force_use_stage1(compiler, target) {
            builder.compiler(1, compiler.host)
        } else {
            compiler.clone()
        };
        let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
        let src = builder.stage_out(compiler, Mode::Std)
            .join(target).join(builder.cargo_dir()).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));
        builder.info(&format!("image_src: {:?}, dst: {:?}", image_src, dst));
        builder.cp_r(&image_src, &dst);
        let mut cmd = rust_installer(builder);
        cmd.arg("generate")
           .arg("--product-name=Rust")
           .arg("--rel-manifest-dir=rustlib")
           .arg("--success-message=save-analysis-saved.")
           .arg("--image-dir").arg(&image)
           .arg("--work-dir").arg(&tmpdir(builder))
           .arg("--output-dir").arg(&distdir(builder))
           .arg(format!("--package-name={}-{}", name, target))
           .arg(format!("--component-name=rust-analysis-{}", target))
           .arg("--legacy-manifest-dirs=rustlib,cargo");
        builder.run(&mut cmd);
        builder.remove_dir(&image);
        distdir(builder).join(format!("{}-{}.tar.gz", name, target))
    }
fn run ( self , builder : & Builder ) -> PathBuf { let compiler = self . compiler ; let target = self . target ; assert ! ( builder config extended ) ; builder . info ( " " ) ; let name = pkgname ( builder , " " ) ; if & compiler . host != builder . config . build { builder . info ( " \t " ) ; return distdir ( builder ) . join ( format ! ( " " name target ) ) ; } builder . ensure ( Std { compiler , target } ) ; // 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 builder . force_use_stage1 ( compiler , target ) { builder . compiler ( 1 , compiler . host ) } else { compiler . clone ( ) } ; let image = tmpdir ( builder ) . join ( format ! ( " " name target ) ) ; let src = builder . stage_out ( compiler , Mode :: Std ) . join ( target ) . join ( builder . cargo_dir ( ) ) . join ( " " ) ; let image_src = src . join ( " " ) ; let dst = image . join ( " " ) . join ( target ) . join ( " " ) ; t ! ( fs create_dir_all ( dst ) ) ; builder . info ( & format ! ( " " image_src dst ) ) ; builder . cp_r ( & image_src , & dst ) ; let mut cmd = rust_installer ( builder ) ; cmd . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( & image ) . arg ( " " ) . arg ( & tmpdir ( builder ) ) . arg ( " " ) . arg ( & distdir ( builder ) ) . arg ( format ! ( " " name target ) ) . arg ( format ! ( " " target ) ) . arg ( " " ) ; builder . run ( & mut cmd ) ; builder . remove_dir ( & image ) ; distdir ( builder ) . join ( format ! ( " " name target ) ) }
Creates a tarball of save-analysis metadata, if available.
Creates a tarball of save - analysis metadata if available .
self
builder
&Builder
self
builder
&Builder