Add as_executable to CcToolchainInfo
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Like we have an `ld_executable` and an `ar_executable` on the CcToolchainInfo API, add an `as_executable`, which gives a string to the assembler executable.
### Feature requests: what underlying problem are you trying to solve with this feature?
When calling the graalvm native-image executable, that executable does, in turn, call the compiler. The path to the compiler can be specified with an option. However, gcc then tries to call `ld` (which is fine because it is already present in the toolchain), followed by `as`, which is not exposed in the toolchain API.
Relevant issue [here](https://github.com/andyscott/rules_graal/issues/10).
### What operating system are you running Bazel on?
The graal rules support mac OS and linux.
### Have you found anything relevant by searching the web?
This issue asks for the same thing on the legacy api. However, it's not clear why it was closed when the new API was introduced, since the new API seemingly also does not have it.
https://github.com/bazelbuild/bazel/issues/5494
Contributor guide
Research direction
Start by locating the CcToolchainInfo API entries for ld_executable and ar_executable and trace how their values are exposed. Add the analogous as_executable entry for the assembler path, then update the corresponding API tests so they verify the new string is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100