diff -Naur a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
--- a/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 09:12:47.596424499 +0000
+++ b/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 13:36:03.509429423 +0000
@@ -1235,7 +1235,12 @@
set(export_to_llvmexports)
if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_llvmexports EXPORT LLVMExports)
+ if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
+ ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
+ set(export_to_llvmexports EXPORT LLVMTestExports)
+ else()
+ set(export_to_llvmexports EXPORT LLVMExports)
+ endif()
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
endif()
diff -Naur a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
--- a/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:12:47.596424499 +0000
+++ b/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:14:33.110044977 +0000
@@ -80,6 +80,7 @@
set(LLVM_CONFIG_EXPORTS_FILE "${LLVM_EXPORTS_FILE}")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS};${LLVM_EXPORTS_BUILDTREE_ONLY}")
set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
set(llvm_config_include_buildtree_only_exports
"include(\"${LLVM_BUILDTREEONLY_EXPORTS_FILE}\")")
configure_file(
@@ -142,6 +143,8 @@
COMPONENT cmake-exports)
install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
+ install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
endif()
install(FILES
diff -Naur a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
--- a/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:12:47.597424505 +0000
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:14:54.261169357 +0000
@@ -105,6 +105,7 @@
@llvm_config_include_buildtree_only_exports@
include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
+ include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
endif()
# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend