brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 31b60a9 Raw
31 lines · plain
1# This optional file is used to exclude entrypoints/headers for specific targets.2 3# Check if sys/random.h is available. If it isn't that implies we're on an older4# version of linux, so we probably also don't have the statx syscall.5try_compile(6  has_sys_random7  ${CMAKE_CURRENT_BINARY_DIR}8  SOURCES ${LIBC_SOURCE_DIR}/cmake/modules/system_features/check_sys_random.cpp9)10 11if(NOT has_sys_random)12  list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS13    libc.src.sys.stat.stat14  )15  # If we're doing a fullbuild we provide the random header ourselves.16  if(NOT LLVM_LIBC_FULL_BUILD)17    list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS18      libc.src.sys.random.getrandom19    )20  endif()21endif()22 23include(CheckSymbolExists)24check_symbol_exists(SYS_faccessat2 "sys/syscall.h" HAVE_SYS_FACCESSAT2)25if(NOT HAVE_SYS_FACCESSAT2)26  message(VERBOSE "unistd.faccessat excluded from build, faccessat2 syscall is not available on the system")27  list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS28    libc.src.unistd.faccessat29  )30endif()31