-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Move llvm submodule updates to rustbuild #81601
Conversation
This comment has been minimized.
This comment has been minimized.
I can't reproduce the CI failure locally :/
|
CI job |
This comment has been minimized.
This comment has been minimized.
@bors r+ rollup=never |
📌 Commit f688d0eeb1eb566fef74dcbe76ff384a05852384 has been approved by |
⌛ Testing commit f688d0eeb1eb566fef74dcbe76ff384a05852384 with merge 96ba9faf2f8839c911cfe4cd777ebc03dd0e9af1... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors rollup=iffy |
Does anyone know how to test cross-compiling? |
This comment has been minimized.
This comment has been minimized.
ccace88
to
797b601
Compare
I still can't replicate the CI failure :/ I guess I can change try builds to cross-compile to mips and see if I can get a backtrace from that? I have the following config.toml: [target.mips-unknown-linux-gnu]
llvm-config = "/usr/lib/llvm-11/bin/llvm-config" and I'm running |
IIRC, CI has custom code to download submodules that's different from what is built in to x.py, but I may be misremembering. |
Ok, that is indeed the issue: |
This comment has been minimized.
This comment has been minimized.
If something goes wrong here, showing `fn output` is unhelpful. Show where the command is being run instead.
r=me with #81601 (comment) resolved |
@bors r=Mark-Simulacrum rollup=never |
📌 Commit 7b9ddf421ce11efbaaffa033cd6507aef2c7bb36 has been approved by |
This comment has been minimized.
This comment has been minimized.
This enables better caching, since LLVM is only updated when needed, not whenever x.py is run. Before, bootstrap.py had to use heuristics to guess if LLVM would be needed, and updated the module more often than necessary as a result. This syncs the LLVM submodule only just before building the compiler, so people working on the standard library never have to worry about it. Example output: ``` Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) Updating submodule src/llvm-project Submodule 'src/llvm-project' (https://github.com/rust-lang/llvm-project.git) registered for path 'src/llvm-project' Submodule path 'src/llvm-project': checked out 'f9a8d70b6e0365ac2172ca6b7f1de0341297458d' ``` - Don't try to update the LLVM submodule when using system LLVM Previously, this would try to update LLVM unconditionally. Now the submodule is only initialized if `llvm-config` is not set. - Don't update LLVM submodule in dry runs This prevents the following test failures: ``` running 17 tests fatal: invalid gitfile format: /checkout/src/llvm-project/.git test builder::tests::defaults::build_cross_compile ... FAILED ---- builder::tests::defaults::build_default stdout ---- thread 'main' panicked at 'command did not execute successfully: "git" "rev-parse" "HEAD" expected success, got: exit code: 128', src/build_helper/lib.rs:139:9 ``` - Try running git without --progress if it fails the first time This avoids having to do version detection to see if --progress is supported or not. - Don't try to update submodules when the source repository isn't managed by git - Update LLVM submodules that have already been checked out - Only check for whether the submodule should be updated in lib.rs; update it unconditionally in native.rs
@bors r=Mark-Simulacrum |
📌 Commit 0be4046 has been approved by |
☀️ Test successful - checks-actions |
…nd, r=jyn514 Revert "Move llvm submodule updates to rustbuild" Reverts rust-lang#81601 This updates LLVM a bit too eagerly -- and particularly on Windows, this can be slow. See discussion on [Zulip]. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/x.2Epy.20always.20updates.20LLVM.20submodule
…nd, r=jyn514 Revert "Move llvm submodule updates to rustbuild" Reverts rust-lang#81601 This updates LLVM a bit too eagerly -- and particularly on Windows, this can be slow. See discussion on [Zulip]. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/x.2Epy.20always.20updates.20LLVM.20submodule
…nd, r=jyn514 Revert "Move llvm submodule updates to rustbuild" Reverts rust-lang#81601 This updates LLVM a bit too eagerly -- and particularly on Windows, this can be slow. See discussion on [Zulip]. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/x.2Epy.20always.20updates.20LLVM.20submodule
This enables better caching, since LLVM is only updated when needed, not
whenever x.py is run. Before, bootstrap.py had to use heuristics to
guess if LLVM would be needed, and updated the module more often than
necessary as a result.
This syncs the LLVM submodule only just before building the compiler, so
people working on the standard library never have to worry about it.
Example output:
Implements #76653 (comment). This could be easily extended to other submodules, like
rust-by-example
andrustc-dev-guide
, which aren't needed for cargo's workspace resolution.