diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -136,8 +136,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 @@ -185,19 +185,21 @@ USES_TERMINAL ) else() + # Since we're building along with LLVM, clang and clang-resource-headers are + # guaranteed so we don't need them in DEPENDS, which can cause issues. if (ARG_EXCLUDE_FROM_CHECK_ALL) add_lit_testsuite(${target} ${comment} ${ARG_UNPARSED_ARGUMENTS} EXCLUDE_FROM_CHECK_ALL - DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS} + DEPENDS FileCheck ${ARG_DEPENDS} ARGS ${ARG_ARGS} ) else() add_lit_testsuite(${target} ${comment} ${ARG_UNPARSED_ARGUMENTS} - DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS} + DEPENDS FileCheck ${ARG_DEPENDS} ARGS ${ARG_ARGS} ) endif()