[feature] Expand tools.build:compiler_executables to accept other common executables like strip
- Dominant language
- Python
- Stars
- 9.5k
- Forks
- 1.1k
- Avg merge
- 23h 48m
- Merged PRs (30d)
- 15
Description
### What is your suggestion?
Currently this conf only accepts some tools, like the C and C++ compilers. This is usually enough but it doesn't cover all use cases.
For example ffmpeg has to get `strip` from the env and if it is not set, crosscompilation fails.
https://github.com/conan-io/conan-center-index/blob/master/recipes/ffmpeg/all/conanfile.py#L630
```
STRIP ffprobe
strip: Unable to recognise the format of the input file `ffprobe_g'
```
Granted, I can add and env variable to my profile
```
tools.build:compiler_executables = {"cpp": "arm-poky-linux-gnueabi-g++", "c": "arm-poky-linux-gnueabi-gcc"}
[buildenv]
ffmpeg/*:STRIP=arm-poky-linux-gnueabi-strip
```
But this splits the information of the names in two, which is confusing and bugprone. If I ever update my toolchain I have to remember to update the names in multiple places.
I think it would be ideal to be able to set the names of all the core tools provided by the toolchain (cc, cpp, cxx, strip, ar, etc) using `tools.build:compiler_executables`
### Have you read the CONTRIBUTING guide?
- [ ] I've read the CONTRIBUTING guide
Contributor guide
Research direction
Start by tracing how tools.build:compiler_executables is parsed and validated, then compare it with the ffmpeg conanfile.py example linked in the issue. Done means common toolchain executables such as strip and ar can be configured through the same setting without a separate STRIP build environment variable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100