diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -60,6 +60,7 @@ project(Runtimes C CXX ASM) find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_package(Clang PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) # Add the root project's CMake modules, and the LLVM build's modules to the # CMake module path. @@ -136,8 +137,11 @@ # The subdirectories need to treat this as standalone builds. D57992 tried # to get rid of this, but the runtimes treat *_STANDALONE_BUILD=OFF as if # llvm & clang are configured in the same CMake, and setup dependencies - # against their targets. - set(${canon_name}_STANDALONE_BUILD ON) + # against their targets. OpenMP has fixed the issue so we don't set the + # variable. + if (NOT ${canon_name} STREQUAL "OPENMP") + set(${canon_name}_STANDALONE_BUILD ON) + endif() if(LLVM_RUNTIMES_LIBDIR_SUBDIR) set(${canon_name}_LIBDIR_SUBDIR "${LLVM_RUNTIMES_LIBDIR_SUBDIR}" CACHE STRING "" FORCE) diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake --- a/openmp/cmake/OpenMPTesting.cmake +++ b/openmp/cmake/OpenMPTesting.cmake @@ -190,14 +190,14 @@ ${comment} ${ARG_UNPARSED_ARGUMENTS} EXCLUDE_FROM_CHECK_ALL - DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS} + DEPENDS clang FileCheck ${ARG_DEPENDS} ARGS ${ARG_ARGS} ) else() add_lit_testsuite(${target} ${comment} ${ARG_UNPARSED_ARGUMENTS} - DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS} + DEPENDS clang FileCheck ${ARG_DEPENDS} ARGS ${ARG_ARGS} ) endif()