Skip to content

Commit

Permalink
Use "rust-installer tarball" to create rustc-src too
Browse files Browse the repository at this point in the history
This gives us an extra rustc-src.tar.xz, which is 33% smaller than the .tar.gz!
  • Loading branch information
cuviper committed May 15, 2017
1 parent 020c5ec commit 6edb4e2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,17 @@ pub fn rust_src(build: &Build) {
write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());

// Create plain source tarball
let tarball = rust_src_location(build);
let mut tarball = rust_src_location(build);
tarball.set_extension(""); // strip .gz
tarball.set_extension(""); // strip .tar
if let Some(dir) = tarball.parent() {
t!(fs::create_dir_all(dir));
}
let mut cmd = Command::new("tar");
cmd.arg("-czf").arg(sanitize_sh(&tarball))
.arg(&plain_name)
let mut cmd = rust_installer(build);
cmd.arg("tarball")
.arg("--input").arg(&plain_name)
.arg("--output").arg(sanitize_sh(&tarball))
.arg("--work-dir=.")
.current_dir(tmpdir(build));
build.run(&mut cmd);

Expand Down

0 comments on commit 6edb4e2

Please sign in to comment.