diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -649,12 +649,6 @@ endforeach() endif() -include(CheckSymbolExists) -check_symbol_exists(proc_pid_rusage "libproc.h" HAVE_PROC_PID_RUSAGE) -if(HAVE_PROC_PID_RUSAGE) - list(APPEND CMAKE_REQUIRED_LIBRARIES proc) -endif() - # Use libtool instead of ar if you are both on an Apple host, and targeting Apple. if(CMAKE_HOST_APPLE AND APPLE) include(UseLibtool) diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -352,6 +352,8 @@ unset(HAVE_FFI_CALL CACHE) endif( LLVM_ENABLE_FFI ) +check_symbol_exists(proc_pid_rusage "libproc.h" HAVE_PROC_PID_RUSAGE) + # Whether we can use std::is_trivially_copyable to verify llvm::is_trivially_copyable. CHECK_CXX_SOURCE_COMPILES(" #include