diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt --- a/clang/lib/Basic/CMakeLists.txt +++ b/clang/lib/Basic/CMakeLists.txt @@ -110,7 +110,6 @@ DEPENDS omp_gen - RISCVTargetParserTableGen ) target_link_libraries(clangBasic diff --git a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt --- a/clang/lib/Driver/CMakeLists.txt +++ b/clang/lib/Driver/CMakeLists.txt @@ -93,7 +93,6 @@ DEPENDS ClangDriverOptions - RISCVTargetParserTableGen LINK_LIBS clangBasic diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in --- a/llvm/cmake/modules/LLVMConfig.cmake.in +++ b/llvm/cmake/modules/LLVMConfig.cmake.in @@ -140,9 +140,9 @@ @llvm_config_include_buildtree_only_exports@ endif() -# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend -# on LLVM's tablegen-generated headers can always depend on this target whether -# building in-tree with LLVM or not. +# By creating the following targets here, subprojects that depend on +# LLVM's tablegen-generated headers can always depend on this target +# whether building in-tree with LLVM or not. if(NOT TARGET intrinsics_gen) add_custom_target(intrinsics_gen) endif() @@ -152,6 +152,9 @@ if(NOT TARGET acc_gen) add_custom_target(acc_gen) endif() +if(NOT TARGET RISCVTargetParserTableGen) + add_custom_target(RISCVTargetParserTableGen) +endif() set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On) include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)