Skip to content

Commit 720ade2

Browse files
authored
[libc][CMake] fix CMake configure issues on openSUSE (#79751)
1 parent f297d0b commit 720ade2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libc/cmake/modules/LLVMLibCArchitectures.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ if(LIBC_TARGET_OS STREQUAL "baremetal")
165165
set(LIBC_TARGET_OS_IS_BAREMETAL TRUE)
166166
elseif(LIBC_TARGET_OS STREQUAL "linux")
167167
set(LIBC_TARGET_OS_IS_LINUX TRUE)
168-
elseif(LIBC_TARGET_OS STREQUAL "poky")
168+
elseif(LIBC_TARGET_OS STREQUAL "poky" OR LIBC_TARGET_OS STREQUAL "suse")
169169
# poky are ustom Linux-base systems created by yocto. Since these are Linux
170170
# images, we change the LIBC_TARGET_OS to linux. This define is used to
171171
# include the right directories during compilation.
172+
#
173+
# openSUSE uses different triple format which causes LIBC_TARGET_OS to be
174+
# computed as "suse" instead of "linux".
172175
set(LIBC_TARGET_OS_IS_LINUX TRUE)
173176
set(LIBC_TARGET_OS "linux")
174177
elseif(LIBC_TARGET_OS STREQUAL "darwin")

0 commit comments

Comments
 (0)