@@ -217,22 +217,22 @@ if (LIBC_TARGET_OS_IS_WINDOWS AND LLVM_LIBC_FULL_BUILD)
217217endif ()
218218
219219if (LIBC_TARGET_OS_IS_LINUX)
220- if (NOT LLVM_LIBC_USE_HOST_KERNEL_HEADERS AND NOT LIBC_KERNEL_HEADERS STREQUAL "" )
221- message (FATAL_ERROR "MUST specify either LIBC_KERNEL_HEADERS or LLVM_LIBC_USE_HOST_KERNEL_HEADERS " )
220+ if (NOT LIBC_USE_HOST_KERNEL_HEADERS AND " ${ LIBC_KERNEL_HEADERS} " STREQUAL "" )
221+ message (FATAL_ERROR "MUST specify either LIBC_KERNEL_HEADERS or LIBC_USE_HOST_KERNEL_HEADERS " )
222222 endif ()
223- if (LLVM_LIBC_USE_HOST_KERNEL_HEADERS AND NOT LIBC_KERNEL_HEADERS STREQUAL "" )
224- message (FATAL_ERROR "LLVM_LIBC_USE_HOST_KERNEL_HEADERS and LIBC_USE_HOST_KERNEL_HEADERS are mutually exclusive" )
223+ if (LIBC_USE_HOST_KERNEL_HEADERS AND NOT " ${ LIBC_KERNEL_HEADERS} " STREQUAL "" )
224+ message (FATAL_ERROR "LIBC_USE_HOST_KERNEL_HEADERS and LIBC_USE_HOST_KERNEL_HEADERS are mutually exclusive" )
225225 endif ()
226- if (LIBC_TARGET_TRIPLE AND LLVM_LIBC_USE_HOST_KERNEL_HEADERS )
226+ if (LIBC_TARGET_TRIPLE AND LIBC_USE_HOST_KERNEL_HEADERS )
227227 # This is because the syscall numbers are frequently different between
228228 # different target architectures. Code may compile, but you'll get spooky
229229 # runtime failures.
230- message (FATAL_ERROR "LLVM_LIBC_USE_HOST_KERNEL_HEADERS should not be set when using LIBC_TARGET_TRIPLE, set LIBC_KERNEL_HEADERS instead" )
230+ message (FATAL_ERROR "LIBC_USE_HOST_KERNEL_HEADERS should not be set when using LIBC_TARGET_TRIPLE, set LIBC_KERNEL_HEADERS instead" )
231231 endif ()
232- if (NOT LIBC_KERNEL_HEADERS STREQUAL "" AND NOT IS_DIRECTORY LIBC_KERNEL_HEADERS)
232+ if (NOT " ${ LIBC_KERNEL_HEADERS} " STREQUAL "" AND NOT IS_DIRECTORY " ${ LIBC_KERNEL_HEADERS} " )
233233 message (FATAL_ERROR "LIBC_KERNEL_HEADERS should be a path to an existing directory" )
234234 endif ()
235- if (LLVM_LIBC_USE_HOST_KERNEL_HEADERS )
235+ if (LIBC_USE_HOST_KERNEL_HEADERS )
236236 set (LIBC_KERNEL_HEADERS "/usr/include" CACHE STRING "Path to Linux kernel headers" FORCE)
237237 endif ()
238238endif ()
0 commit comments