Skip to content

Commit

Permalink
Rollup merge of rust-lang#44076 - RalfJung:src, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ariel Ben-Yehuda authored Aug 29, 2017
2 parents b1fff23 + bd24325 commit ba304b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ba304b9

Please sign in to comment.