llvm / llvm/llvm-project

[libc][cmake] Rewrite architecture/target OS normalization

Open
#169,075 1 comment 0 reactions 0 assignees View on GitHub
libc
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.