C++ compiler is selected via a constraint
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
Bazel selects C++ compiler using a compiler constraint. Because of this, users need to create a new platform for each compiler. This doesn't really match the expectation of what a platform should describe.
The problem is most obvious on Windows, which has several C++ compilers.
### Proposed solution
What should happen instead is that the compiler is selected by `--compiler` flag (that has arbitrary string value). This approach is well tested and works well at Google.
Caveat is that this is now an incompatible change. Compiler constraint was introduced very early, before Bazel team build up experience with platforms and toolchains.
Contributor guide
Research direction
Start by tracing Bazel's compiler constraint selection and the --compiler flag, with particular attention to Windows; the issue names no files or tests. Done means compiler selection uses the arbitrary --compiler value rather than requiring a separate platform for each compiler, while accounting for the incompatible change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100