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 older 4# version of linux, so we probably also don't have the statx syscall. 5try_compile( 6 has_sys_random 7 ${CMAKE_CURRENT_BINARY_DIR} 8 SOURCES ${LIBC_SOURCE_DIR}/cmake/modules/system_features/check_sys_random.cpp 9) 10 11if(NOT has_sys_random) 12 list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS 13 libc.src.sys.stat.stat 14 ) 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_ENTRYPOINTS 18 libc.src.sys.random.getrandom 19 ) 20 endif() 21endif() 22