-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make LLVM version suffix independent of rustc version on dev channel #70882
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I'm surprised this fixes things. CFG_RELEASE_NUM, as far as I can tell, is changed once every 6 weeks, so presumably when switching branches that's not changing much. Can you confirm that's the cause of the rebuilds you're seeing, and if so, add a comment noting that this is necessary mostly around bootstrap bump time (when if you're switching between branches and don't rebase them on master, you'll need to rebuild)? Thinking more on this, though, if you're not rebasing your branches on master (fixing the submodule as a side-effect) during bootstrap compiler bump (every 6 weeks), you're rebuilding all of std/rustc anyway, so I would expect that a LLVM rebuild isn't all that much more work. Maybe I'm wrong about that though? |
I agree that this shouldn't be an issue too often, but is there any reason not to fix this anyway? |
Remove rustc version from LLVM version suffix on dev channel, avoiding the need for full rebuilds when moving between commits with different LLVM submodule & rustc version.
2b8d6f7
to
7c5a4cd
Compare
I added a comment explaining the motivation behind the current implementation, so one does not have to look up the commit message to find it out. |
Well, it's not that we can't fix it, more so that I'm not quite sure this is the right fix. I unfortunately don't have the reasoning for including the rustc version in the filename/version in cache, but from what I recall it's because we needed to avoid loading the wrong LLVM when compiling or so (when you're e.g. bootstrapping and have both beta sysroot and the new sysroot in your load path). But given that this PR only affects the dev channel (for which we never ship artifacts) that shouldn't be a problem, I think. Though it could lead to problems if trying to build rust itself with a dev channel compiler, but that doesn't happen today either to my knowledge. Let's land this, and if it turns out this breaks things in practice during e.g. bootstrap bump we can revert that decision. @bors r+ |
📌 Commit 7c5a4cd has been approved by |
⌛ Testing commit 7c5a4cd with merge 458ad1c7cf29552f9fc6f6d05c312ad8d9f33130... |
@bors retry yield |
☀️ Test successful - checks-azure |
Remove rustc version from LLVM version suffix on dev channel,
avoiding the need for full rebuilds when switching between
branches with different LLVM submodule & rustc version.
Note: To avoid full rebuild, on subsequent LLVM submodule update, copy the
current value of
LLVM_VERSION_SUFFIX
frombuild/*/llvm/build/CMakeCache.txt
,to
version-suffix
inconfig.toml
.