Allow a toolchain to be provisioned by the build
- Dominant language
- No language data
- Stars
- 94
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
It is important in the native domain that the correct toolchain implementation is used to compile and link binaries, for example when sharing source code or binaries between teams, or to ensure that the developers and CI builds do not see spurious failures, or to ensure that the outputs can be effectively shared across the team using the build cache (when it can do so).
It should be possible to declare in the build which toolchain implementation should be used to build a particular variant, and allow plugins to provide strategies for locating or provisioning matching toolchain implementations. This might include downloading or installing using the system package manager.
Implementation-wise, there may be several parts to this:
1. Some public API to represent a tool implementation. This is provided to the task implementations.
2. Some reusable tool implementations and factories to create them, for example a GCC-like C++ compiler that can be pointed at a particular g++ executable.
3. Allow a tool to be 'buildable' in the sense that some tasks may be required to execute before the tool is usable. Currently, the toolchains must all be available during configuration.
A plugin can combine these to define some tasks to download or otherwise provision the toolchain and wire these into the tasks for a variant.
We don't necessarily need any concept of a 'tool chain' or 'tool chain locator' to solve this problem. These would be higher level concepts to make it simpler and more robust to wire in a strategy to locate a particular tool chain.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by mapping the existing toolchain and task configuration APIs, then determine how a public tool representation, reusable implementations, and buildable tools would fit together. Done means a plugin can select or provision a matching toolchain for a variant and use it for compilation and linking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100