]> git.lizzy.rs Git - rust.git/commitdiff
include Cargo.{toml,lock} in rust-src tarball
authorRalf Jung <post@ralfj.de>
Thu, 24 Aug 2017 21:25:35 +0000 (23:25 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 24 Aug 2017 21:25:35 +0000 (23:25 +0200)
src/bootstrap/dist.rs

index bfcfb5f9a37f8d994017461956d437aa83f1ef7b..8d3fc0669822e0adf34a756aa142b8de4f906247 100644 (file)
@@ -724,6 +724,10 @@ fn run(self, builder: &Builder) -> PathBuf {
         let dst_src = dst.join("rust");
         t!(fs::create_dir_all(&dst_src));
 
+        let src_files = [
+            "src/Cargo.toml",
+            "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 +763,9 @@ fn run(self, builder: &Builder) -> PathBuf {
         ];
 
         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);