[libc][cmake] Rewrite architecture/target OS normalization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Currently in the LLVM-libc build there's a cmake file that normalizes the names of the target architectures and target OSes using a big "if/else" statement: https://github.com/llvm/llvm-project/blob/3ccf8ef715574ae9d2fd041cd9b438dd04a7a002/libc/cmake/modules/LLVMLibCArchitectures.cmake
Ideally this would be either a separate file expressing these mappings that the cmake loads or at least a dictionary in the cmake. Also this file currently defines a bunch of booleans such as `LIBC_TARGET_ARCHITECTURE_IS_X86_64` or `LIBC_TARGET_ARCHITECTURE_IS_ANY_RISCV`. We should determine if these flags are useful, and either clean them up or define them in a more programatic way.
Contributor guide
Assessment
This issue has not been assessed yet.