about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2017-08-29 21:40:56 +0000
committerGitHub <noreply@github.com>2017-08-29 21:40:56 +0000
commitba304b96c470ae825c60dc063c2eb3fa8bb060aa (patch)
tree7188a6291217267cfa52bcc7ddf84c15cdd64cff /src
parentb1fff23f602eaab2953d933836a9406d61d3be0e (diff)
parentbd24325ce1c4af21d519ca38e6973a6018ee7ad8 (diff)
downloadrust-ba304b96c470ae825c60dc063c2eb3fa8bb060aa.tar.gz
rust-ba304b96c470ae825c60dc063c2eb3fa8bb060aa.zip
Rollup merge of #44076 - RalfJung:src, r=alexcrichton
include Cargo.{toml,lock} in rust-src tarball

The lock file is interesting because e.g. xargo could use it to build libstd against the same dependencies that were used for the main build. More generally speaking, just documenting in this form which exact dependencies should be used IMHO makes lots of sense.

I added the Cargo.toml mostly because having the lock without the toml feels odd. Of course, the toml contains references to paths that don't actually exist in the rust-src tarball. Not sure if that is considered a problem.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/dist.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 153ffe509f3..746f85a9d59 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -724,6 +724,9 @@ impl Step for Src {
         let dst_src = dst.join("rust");
         t!(fs::create_dir_all(&dst_src));
 
+        let src_files = [
+            "src/Cargo.lock",
+        ];
         // This is the reduced set of paths which will become the rust-src component
         // (essentially libstd and all of its path dependencies)
         let std_src_dirs = [
@@ -759,6 +762,9 @@ impl Step for Src {
         ];
 
         copy_src_dirs(build, &std_src_dirs[..], &std_src_dirs_exclude[..], &dst_src);
+        for file in src_files.iter() {
+            copy(&build.src.join(file), &dst_src.join(file));
+        }
 
         // Create source tarball in rust-installer format
         let mut cmd = rust_installer(builder);