mgorny created this revision. mgorny added reviewers: rupprecht, tstellar, MaskRay, thesamesam. Herald added a project: All. mgorny requested review of this revision.
The LLVMTestingAnnotations library that is now used by unittests is not installed as part of LLVM. In order to make it possible to build unittests when performing the standalone build of clang, build the library from LLVM sources locally. This mirrors the existing logic for LLVMTestingSupport. https://reviews.llvm.org/D142449 Files: clang/unittests/CMakeLists.txt Index: clang/unittests/CMakeLists.txt =================================================================== --- clang/unittests/CMakeLists.txt +++ clang/unittests/CMakeLists.txt @@ -2,7 +2,12 @@ set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") if(CLANG_BUILT_STANDALONE) - # LLVMTestingSupport library is needed for some of the unittests. + # LLVMTesting* libraries are needed for some of the unittests. + if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + AND NOT TARGET LLVMTestingAnnotations) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + lib/Testing/Annotations) + endif() if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support AND NOT TARGET LLVMTestingSupport) add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
Index: clang/unittests/CMakeLists.txt =================================================================== --- clang/unittests/CMakeLists.txt +++ clang/unittests/CMakeLists.txt @@ -2,7 +2,12 @@ set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") if(CLANG_BUILT_STANDALONE) - # LLVMTestingSupport library is needed for some of the unittests. + # LLVMTesting* libraries are needed for some of the unittests. + if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + AND NOT TARGET LLVMTestingAnnotations) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + lib/Testing/Annotations) + endif() if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support AND NOT TARGET LLVMTestingSupport) add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits