Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't clone LLVM submodule when download-ci-llvm is set #81520

Merged
merged 1 commit into from
Jan 30, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 29, 2021

Previously, downloading_llvm would check self.build while it was
still an empty string, and think it was always false. This fixes the
check.

This addresses the worst part of #76653. There are still some large submodules being downloaded (in particular, rustc-by-example is 146 MB, and all the submodules combined are 311 MB), but this is a lot better than the whopping 1.4 GB before.

Previously, `downloading_llvm` would check `self.build` while it was
still an empty string, and think it was always false. This fixes the
check.
@jyn514 jyn514 added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Jan 29, 2021
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2021
@Mark-Simulacrum
Copy link
Member

Hm, do we need to be careful around LLVM submodule being out of date locally perhaps as well? I am worried it'll be a pain point for contributors that already have it checked out and now x.py will not update it for them. But maybe we handle that case?

@jyn514
Copy link
Member Author

jyn514 commented Jan 29, 2021

I am worried it'll be a pain point for contributors that already have it checked out and now x.py will not update it for them.

When would they need to use src/llvm-project when downloading CI llvm? If you're changing anything there, I'd expect you to be building LLVM from source.

@jyn514
Copy link
Member Author

jyn514 commented Jan 29, 2021

Also, if they really do need the old behavior, they can always use git submodule update src/llvm-project.

@Mark-Simulacrum
Copy link
Member

I'm saying they don't need it but already have it checked out. If they're used to x.py keeping submodules up to date, then figuring out how to avoid the change to the submodule is going to be difficult for most people. Can we make sure that we keep it updated if it exists, even if download-llvm is set?

@jyn514
Copy link
Member Author

jyn514 commented Jan 29, 2021

Ok, I see, because git will start marking it as out of date. Sure, seems reasonable. You actually added that when you wrote the feature originally, I don't think it needs further changes:

# not being built. Also, if the submodule has been initialized
# already, sync it anyways so that it doesn't mess up contributor
# pull requests.
if external_llvm_provided or not llvm_needed:
if self.get_toml('lld') != 'true' and not llvm_checked_out:

@nagisa
Copy link
Member

nagisa commented Jan 29, 2021

When would they need to use src/llvm-project when downloading CI llvm?

Reading the source code is a quite relevant use-case here. Maybe introduce another option and/or value for this behaviour so that we don't need to guess?

@jyn514
Copy link
Member Author

jyn514 commented Jan 29, 2021

@nagisa right, but you can do that with git submodule update anyway. My question is why would you want it to be automatic (and add another button to toggle) when you can run the command once and have it updated going forward?

@Mark-Simulacrum
Copy link
Member

Heh, ok, sounds like past me did the right thing already :)

@bors r+

@bors
Copy link
Contributor

bors commented Jan 29, 2021

📌 Commit db115f1 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2021
Rollup of 16 pull requests

Successful merges:

 - rust-lang#79023 (Add `core::stream::Stream`)
 - rust-lang#80562 (Consider Scalar to be a bool only if its unsigned)
 - rust-lang#80886 (Stabilize raw ref macros)
 - rust-lang#80959 (Stabilize `unsigned_abs`)
 - rust-lang#81291 (Support FRU pattern with `[feature(capture_disjoint_fields)]`)
 - rust-lang#81409 (Slight simplification of chars().count())
 - rust-lang#81468 (cfg(version): treat nightlies as complete)
 - rust-lang#81473 (Warn write-only fields)
 - rust-lang#81495 (rustdoc: Remove unnecessary optional)
 - rust-lang#81499 (Updated Vec::splice documentation)
 - rust-lang#81501 (update rustfmt to v1.4.34)
 - rust-lang#81505 (`fn cold_path` doesn't need to be pub)
 - rust-lang#81512 (Add missing variants in match binding)
 - rust-lang#81515 (Fix typo in pat.rs)
 - rust-lang#81519 (Don't print error output from rustup when detecting default build triple)
 - rust-lang#81520 (Don't clone LLVM submodule when download-ci-llvm is set)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 31e7634 into rust-lang:master Jan 30, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 30, 2021
@jyn514 jyn514 deleted the rustc2 branch January 30, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants