diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake index 3b0c948e6a64..313956493238 100644 --- a/llvm/cmake/modules/LLVM-Config.cmake +++ b/llvm/cmake/modules/LLVM-Config.cmake @@ -62,13 +62,7 @@ endmacro(llvm_config) function(explicit_llvm_config executable) set( link_components ${ARGN} ) - # Check for out-of-tree builds. - if(PROJECT_NAME STREQUAL "LLVM") - llvm_map_components_to_libnames(LIBRARIES ${link_components}) - else() - explicit_map_components_to_libraries(LIBRARIES ${link_components}) - endif() - + llvm_map_components_to_libnames(LIBRARIES ${link_components}) target_link_libraries(${executable} ${LIBRARIES}) endfunction(explicit_llvm_config)