[all-commits] [llvm/llvm-project] 7c2ece: [libc] Normalize LIBC_TARGET_MACHINE

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Wed May 5 08:53:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c2ece523d7ff74f3eeabce1b9685f3eaae8cff4
      https://github.com/llvm/llvm-project/commit/7c2ece523d7ff74f3eeabce1b9685f3eaae8cff4
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M libc/CMakeLists.txt
    A libc/cmake/modules/LLVMLibCArchitectures.cmake
    M libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
    M libc/config/linux/CMakeLists.txt
    M libc/loader/linux/CMakeLists.txt
    M libc/src/math/CMakeLists.txt
    M libc/src/string/CMakeLists.txt
    M libc/src/string/aarch64/CMakeLists.txt
    R libc/src/string/x86/CMakeLists.txt
    R libc/src/string/x86/memcpy.cpp
    A libc/src/string/x86_64/CMakeLists.txt
    A libc/src/string/x86_64/memcpy.cpp
    M libc/src/threads/linux/CMakeLists.txt
    M libc/test/config/linux/CMakeLists.txt
    M libc/test/loader/linux/CMakeLists.txt
    M libc/test/src/math/CMakeLists.txt
    M libc/test/utils/FPUtil/CMakeLists.txt
    M libc/utils/FPUtil/CMakeLists.txt

  Log Message:
  -----------
  [libc] Normalize LIBC_TARGET_MACHINE

Current implementation defines LIBC_TARGET_MACHINE with the use of CMAKE_SYSTEM_PROCESSOR.
Unfortunately CMAKE_SYSTEM_PROCESSOR is OS dependent and can produce different results.
An evidence of this is the various matchers used to detect whether the architecture is x86.

This patch normalizes LIBC_TARGET_MACHINE and renames it LIBC_TARGET_ARCHITECTURE.
I've added many architectures but we may want to limit ourselves to x86 and ARM.

Differential Revision: https://reviews.llvm.org/D101524




More information about the All-commits mailing list