diff options
author | Mikhail R. Gadelha <mikhail@igalia.com> | 2023-08-09 10:26:09 -0300 |
---|---|---|
committer | Mikhail R. Gadelha <mikhail@igalia.com> | 2023-08-09 10:40:19 -0300 |
commit | 860d38bf57470de2b94ffec1cfe2c7d7e65fbbdc (patch) | |
tree | beee6391afe55c9aebe21b5a5d7c57f047d4694f /libc/cmake | |
parent | 479955a42a71242e3577c639ca276c75f1a3c2b2 (diff) | |
download | llvm-860d38bf57470de2b94ffec1cfe2c7d7e65fbbdc.zip llvm-860d38bf57470de2b94ffec1cfe2c7d7e65fbbdc.tar.gz llvm-860d38bf57470de2b94ffec1cfe2c7d7e65fbbdc.tar.bz2 |
[libc] Support poky system
This patch adds support for yocto images, which are custom Linux-base
systems created by yocto.
$CMAKE_HOST_SYSTEM_NAME returns "poky" as the system name, but it is a
linux image, so we just replace the name with "linux", so libc can use
the correct path.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D157404
Diffstat (limited to 'libc/cmake')
-rw-r--r-- | libc/cmake/modules/LLVMLibCArchitectures.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake index 1e53e1a..89b5f2d 100644 --- a/libc/cmake/modules/LLVMLibCArchitectures.cmake +++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake @@ -163,6 +163,12 @@ 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") + # 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. + set(LIBC_TARGET_OS_IS_LINUX TRUE) + set(LIBC_TARGET_OS "linux") elseif(LIBC_TARGET_OS STREQUAL "darwin") set(LIBC_TARGET_OS_IS_DARWIN TRUE) elseif(LIBC_TARGET_OS STREQUAL "windows") |