Rollup merge of #137340 - Kobzol:bootstrap-dir-check, r=onur-ozkan
Add a notice about missing GCC sources into source tarballs I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing. Inspired by https://github.com/rust-lang/rust/issues/137332. r? `@onur-ozkan`
This commit is contained in:
commit
4d479f9c80
2 changed files with 12 additions and 1 deletions
|
@ -1029,6 +1029,17 @@ impl Step for PlainSourceTarball {
|
|||
],
|
||||
plain_dst_src,
|
||||
);
|
||||
// We keep something in src/gcc because it is a registered submodule,
|
||||
// and if it misses completely it can cause issues elsewhere
|
||||
// (see https://github.com/rust-lang/rust/issues/137332).
|
||||
// We can also let others know why is the source code missing.
|
||||
if !builder.config.dry_run() {
|
||||
builder.create_dir(&plain_dst_src.join("src/gcc"));
|
||||
t!(std::fs::write(
|
||||
plain_dst_src.join("src/gcc/notice.txt"),
|
||||
"The GCC source code is not included due to unclear licensing implications\n"
|
||||
));
|
||||
}
|
||||
|
||||
// Copy the files normally
|
||||
for item in &src_files {
|
||||
|
|
|
@ -492,7 +492,7 @@ impl Build {
|
|||
}
|
||||
self.config.update_submodule(submodule);
|
||||
let absolute_path = self.config.src.join(submodule);
|
||||
if dir_is_empty(&absolute_path) {
|
||||
if !absolute_path.exists() || dir_is_empty(&absolute_path) {
|
||||
let maybe_enable = if !self.config.submodules()
|
||||
&& self.config.rust_info.is_managed_git_subrepository()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue