Closed
Bug 1505040
Opened 7 years ago
Closed 5 months ago
Add support for auto-bootstrapping some dependencies while running configure
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ted, Unassigned)
Details
We have enough build dependencies that the cycle of "update your source checkout, try to build, realize you have to run `mach bootstrap` again" can get pretty tedious. It's even more pronounced for people that don't update and build on a daily basis, or for developers who have a build environment that they don't use regularly (like a Windows VM).
For build dependencies that we already pull from pre-built toolchains in bootstrap, or things like Rust installed via rustup that are easy to install and don't require invoking the system package manger, it would be great if we could teach configure to simply bootstrap a missing/outdated dependency and continue on. Even just supporting this for the set of things where it would be possible and on our Tier 1 platforms would make the build experience a lot nicer for many people.
Comment 1•7 years ago
|
||
Great idea Ted! I've personally run into this issue a number of times since I don't run builds as often as a regular developer.
Comment 2•7 years ago
|
||
Implementation note: this should be limited to local builds only (developer_options).
Comment 3•7 years ago
|
||
I want the default behavior for developer builds to be for the build system to manage toolchains for you automatically on tier 1 platforms. e.g. if you have a source checkout on a fresh machine, `mach build` will download the exact Clang, Rust, etc toolchains that CI uses for that revision and use them.
If you update your source revision and the toolchain changes, the new toolchain is downloaded and used automatically.
Whether this is implemented in configure or elsewhere, it doesn't matter.
Obviously we would need a way to disable this behavior, as it isn't appropriate everywhere.
FWIW we also need better support for multiple versions of toolchains in ~/.mozbuild. Right now, we e.g. install a single version of Clang to ~/.mozbuild/clang. If you have e.g. a mozilla-central and mozilla-beta checkout, they will compete with each other for toolchain management. We probably want some kind of LRU "cache" to hold toolchains. Artifact builds employ something like this.
Comment 4•7 years ago
|
||
`mach artifact toolchain` has a LRU cache of the downloaded bits.
Comment 5•7 years ago
|
||
So I guess it is just the extracted archive that doesn't support multiple "installs." I'd love to see an LRU cache there as well. But that is arguably for a separate bug.
Updated•3 years ago
|
Severity: normal → S3
Comment 6•5 months ago
|
||
This has been done for various dependencies, recently bug 1686880 is notable.
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•