Skip to content

Commit

Permalink
Reduce the contents of the rust-src component
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Apr 25, 2017
1 parent 7248f67 commit b9bdb17
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,35 @@ pub fn rust_src(build: &Build) {
let dst_src = dst.join("rust");
t!(fs::create_dir_all(&dst_src));

cp_r(&plain_dst_src, &dst_src);
// 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 = [
"src/build_helper",
"src/liballoc",
"src/liballoc_jemalloc",
"src/liballoc_system",
"src/libcollections",
"src/libcompiler_builtins",
"src/libcore",
"src/liblibc",
"src/libpanic_abort",
"src/libpanic_unwind",
"src/librand",
"src/librustc_asan",
"src/librustc_lsan",
"src/librustc_msan",
"src/librustc_tsan",
"src/libstd",
"src/libstd_unicode",
"src/libunwind",
"src/rustc/libc_shim",
];

for item in &std_src_dirs {
let dst = &dst_src.join(item);
t!(fs::create_dir_all(dst));
cp_r(&plain_dst_src.join(item), dst);
}

// Create source tarball in rust-installer format
let mut cmd = Command::new(SH_CMD);
Expand Down

0 comments on commit b9bdb17

Please sign in to comment.