-
Notifications
You must be signed in to change notification settings - Fork 3.8k
rust: stop relying on rustc's LLVM caches #26644
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
base: master
Are you sure you want to change the base?
rust: stop relying on rustc's LLVM caches #26644
Conversation
|
This is an alternative to #26643 which will patch out the undesired behavior at the cost of exposing OpenWRT packages to breakage, especially if reused in other distros. |
|
I expect somebody complaining about long build times :/ |
|
You can add this to the bootstrap.toml: [target.x86_64-unknown-linux-gnu]
llvm-config = "/path/to/llvm-config"with the obvious caveat of the path being whatever We support the current LLVM and LLVM-1 with our rustc precisely so that distros can reuse their LLVMs. |
|
in the long run I hope we'll be able to use it. |
|
We are probably happy to work with you on other solutions for improving distro build times if reusing your distro's LLVM is not adequate. But as things currently stand, I don't think you want to be using our CI-cached LLVMs because it's kinda just tempting fate. Right now we simply are not even thinking about the possibility of a downstream using it. So I think this patch is still more correct even if you want other things now or in the future. |
|
I agree in principle, just that if somebody came up with using the ci-cache, I'm sure they will complain now ^^; |
|
It was added in #20686 to get around properly integrating OpenWRT's LLVM into the rustc build with the necessary flags and error handling to have a desirable experience. You can land quick hacks as you may, but eventually the piper comes calling. |
|
After testing, the compilation time increased exponentially. This is a nightmare for Github action. |
|
You seem to have an LLVM in your base image but it isn't being reused for rustc. |
|
Where does llvm-config get installed to? "/usr/bin/llvm-config"? |
From the ubuntu-latest image of github action, there is no llvm-config file in the /usr/bin/ directory, only these three files: /usr/bin/llvm-config-18 |
|
Hrm? I meant the OpenWRT repo? Do you not have a prebuilt image of that? |
|
Keep in mind that in OpenWRT llvm is basically just used for the eBPF support and it is quite optional ^^; |
|
Despite being used in a quite few packages OpenWrt's LLVM builds a LOT of time. 😆 |
|
@workingjubilee Would it be possible to look at the failing check about formalities, please? :) |
|
Kind ping. |
|
@1715173329 shall we bite the bullet and rework the llvm support so we can lean on it? |
Hmmm sorry for my poor English. Do you mean make use of the llvm toolchain on the host, or from the llvm-bpf package, or something else? |
|
Something that can be done is to have an llvm build that covers host, target and bpf as part of the toolchain, then use it to build rust and any other package that can use the llvm provided. |
That sounds good. Cc @dangowrt |
Paramiko requies rust. But the rust build is broken on upstream: openwrt/packages#26644
Paramiko requies rust. But the rust build is broken on upstream: openwrt/packages#26644
Paramiko requies rust. But the rust build is broken on upstream: openwrt/packages#26644
ddaeda2 to
23b7a04
Compare
Maintainer: @lu-zero
Compile tested: None
Run tested: None
Description: Using the
download-ci-llvmflag that is offered by rust-lang/rust's bootstrap process can accelerate builds in local development but will break in CI if the version of rustc is not kept in tight lockstep with upstream's rustc. It also depends on a number of assumptions that hinge on having a git-maintained repo instead of e.g. a tarball, and can induce breakage from that as well. Avoid future breakage by ceasing to use it.Fixes: #26623