[libc][cmake] Reduce entrypoint list duplication
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Currently the list of entrypoints defined for a given platform is listed exclusively in the `entrypoints.txt` for that platform (e.g. for x86_64/linux: https://github.com/llvm/llvm-project/blob/3ccf8ef715574ae9d2fd041cd9b438dd04a7a002/libc/config/linux/x86_64/entrypoints.txt).
Most of these lists for the same OS target should be the same, but they often drift out of sync. We should change the way `entrypoints.txt` is handle to better match how `config.json` is handled: There's a top level definition for every linux target (for example) and then each more specific target can include or exclude individual entrypoints.
To implement this there will need to be a significant refactoring in the main CMake file: https://github.com/llvm/llvm-project/blob/3ccf8ef715574ae9d2fd041cd9b438dd04a7a002/libc/CMakeLists.txt#L356.
Contributor guide
Assessment
This issue has not been assessed yet.