Skip to content

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

@michaelrj-google

Description

@michaelrj-google

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions