Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,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()
{
Expand Down
Loading