Rollup merge of #135658 - Kobzol:src-tarball-remove-gcc, r=jieyouxu

Do not include GCC source code in source tarballs

The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet).

```
Before:
121s building the archive
1.3 GiB gzipped size
5.7 GiB extracted size
402519 extracted files

After:
64s building the archive
961 MiB gzipped size
4.5 GiB extracted size
257719 extracfed files
```

Fixes: https://github.com/rust-lang/rust/issues/135606

r? `@ehuss`
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-20 21:45:05 +08:00 committed by GitHub
commit a41d652d10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1015,7 +1015,18 @@ impl Step for PlainSourceTarball {
];
let src_dirs = ["src", "compiler", "library", "tests", "LICENSES"];
copy_src_dirs(builder, &builder.src, &src_dirs, &[], plain_dst_src);
copy_src_dirs(
builder,
&builder.src,
&src_dirs,
&[
// We don't currently use the GCC source code for building any official components,
// it is very big, and has unclear licensing implications due to being GPL licensed.
// We thus exclude it from the source tarball from now.
"src/gcc",
],
plain_dst_src,
);
// Copy the files normally
for item in &src_files {