Skip to content

Commit 7c15afb

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of rust-lang#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.
2 parents e614fd4 + bd24325 commit 7c15afb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/dist.rs

+6
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,9 @@ impl Step for Src {
724724
let dst_src = dst.join("rust");
725725
t!(fs::create_dir_all(&dst_src));
726726

727+
let src_files = [
728+
"src/Cargo.lock",
729+
];
727730
// This is the reduced set of paths which will become the rust-src component
728731
// (essentially libstd and all of its path dependencies)
729732
let std_src_dirs = [
@@ -759,6 +762,9 @@ impl Step for Src {
759762
];
760763

761764
copy_src_dirs(build, &std_src_dirs[..], &std_src_dirs_exclude[..], &dst_src);
765+
for file in src_files.iter() {
766+
copy(&build.src.join(file), &dst_src.join(file));
767+
}
762768

763769
// Create source tarball in rust-installer format
764770
let mut cmd = rust_installer(builder);

0 commit comments

Comments
 (0)