diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index 6bd2b535500e..e2b4bf999a4d 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -546,6 +546,9 @@ set(LLVM_BINUTILS_INCDIR "" CACHE PATH "PATH to binutils/include containing plugin-api.h for gold plugin.") if(CMAKE_HOST_APPLE AND APPLE) + if(NOT CMAKE_XCRUN) + find_program(CMAKE_XCRUN NAMES xcrun) + endif() if(CMAKE_XCRUN) execute_process(COMMAND ${CMAKE_XCRUN} -find ld OUTPUT_VARIABLE LD64_EXECUTABLE