[libc-commits] [libc] 720ade2 - [libc][CMake] fix CMake configure issues on openSUSE (#79751)

via libc-commits libc-commits at lists.llvm.org
Sun Jan 28 07:56:48 PST 2024


Author: Sirui Mu
Date: 2024-01-28T10:56:43-05:00
New Revision: 720ade25044536aed7372554e1818eac9536dc3a

URL: https://github.com/llvm/llvm-project/commit/720ade25044536aed7372554e1818eac9536dc3a
DIFF: https://github.com/llvm/llvm-project/commit/720ade25044536aed7372554e1818eac9536dc3a.diff

LOG: [libc][CMake] fix CMake configure issues on openSUSE (#79751)

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCArchitectures.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index 10571101a34178..623ed774be7270 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -165,10 +165,13 @@ if(LIBC_TARGET_OS STREQUAL "baremetal")
   set(LIBC_TARGET_OS_IS_BAREMETAL TRUE)
 elseif(LIBC_TARGET_OS STREQUAL "linux")
   set(LIBC_TARGET_OS_IS_LINUX TRUE)
-elseif(LIBC_TARGET_OS STREQUAL "poky")
+elseif(LIBC_TARGET_OS STREQUAL "poky" OR LIBC_TARGET_OS STREQUAL "suse")
   # poky are ustom Linux-base systems created by yocto. Since these are Linux
   # images, we change the LIBC_TARGET_OS to linux. This define is used to
   # include the right directories during compilation.
+  #
+  # openSUSE uses 
diff erent triple format which causes LIBC_TARGET_OS to be
+  # computed as "suse" instead of "linux".
   set(LIBC_TARGET_OS_IS_LINUX TRUE)
   set(LIBC_TARGET_OS "linux")
 elseif(LIBC_TARGET_OS STREQUAL "darwin")


        


More information about the libc-commits mailing list