about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2017-05-08 15:23:30 -0700
committerJosh Stone <jistone@redhat.com>2017-05-14 21:06:23 -0700
commit6edb4e22c46ae34b5b8ee0f2672f02d890944105 (patch)
tree730875079cf464bfb34e1e57593034c7aee1e29d
parent020c5ecca710a21f85be028d6225c9c82638ade0 (diff)
downloadrust-6edb4e22c46ae34b5b8ee0f2672f02d890944105.tar.gz
rust-6edb4e22c46ae34b5b8ee0f2672f02d890944105.zip
Use "rust-installer tarball" to create rustc-src too
This gives us an extra rustc-src.tar.xz, which is 33% smaller than the .tar.gz!
-rw-r--r--src/bootstrap/dist.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 028bfe3408f..254b817b847 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -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);