tstellar created this revision. tstellar added a reviewer: vtjnash. Herald added a subscriber: mgorny. tstellar requested review of this revision. Herald added a project: clang-tools-extra.
This fixes clang + clang-tools-extra standalone build after 36892727e4f19a60778e371d78f8fb09d8122c85 <https://reviews.llvm.org/rG36892727e4f19a60778e371d78f8fb09d8122c85>. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120301 Files: clang-tools-extra/test/CMakeLists.txt clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp clang-tools-extra/test/lit.cfg.py clang-tools-extra/test/lit.site.cfg.py.in Index: clang-tools-extra/test/lit.site.cfg.py.in =================================================================== --- clang-tools-extra/test/lit.site.cfg.py.in +++ clang-tools-extra/test/lit.site.cfg.py.in @@ -13,6 +13,7 @@ config.target_triple = "@TARGET_TRIPLE@" config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ +config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. Index: clang-tools-extra/test/lit.cfg.py =================================================================== --- clang-tools-extra/test/lit.cfg.py +++ clang-tools-extra/test/lit.cfg.py @@ -155,3 +155,6 @@ # Plugins (loadable modules) if config.has_plugins and config.llvm_plugin_ext: config.available_features.add('plugins') + +if config.has_llvm_hello: + config.available_features.add("llvm-hello") Index: clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +++ clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp @@ -1,4 +1,4 @@ -// REQUIRES: plugins +// REQUIRES: plugins, llvm-hello // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s // CHECK-LIST: Enabled checks: // CHECK-LIST-NEXT: mytest1 Index: clang-tools-extra/test/CMakeLists.txt =================================================================== --- clang-tools-extra/test/CMakeLists.txt +++ clang-tools-extra/test/CMakeLists.txt @@ -15,10 +15,15 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +if (TARGET LLVMHello) + set (LLVM_HAS_LLVM_HELLO 1) +endif() + llvm_canonicalize_cmake_booleans( CLANG_TIDY_ENABLE_STATIC_ANALYZER CLANG_PLUGIN_SUPPORT LLVM_INSTALL_TOOLCHAIN_ONLY + LLVM_HAS_LLVM_HELLO ) configure_lit_site_cfg( @@ -97,7 +102,10 @@ endif() if(TARGET CTTestTidyModule) - list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) + list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) + if (TARGET LLVMHello) + list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) + endif() target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) set(LLVM_LINK_COMPONENTS
Index: clang-tools-extra/test/lit.site.cfg.py.in =================================================================== --- clang-tools-extra/test/lit.site.cfg.py.in +++ clang-tools-extra/test/lit.site.cfg.py.in @@ -13,6 +13,7 @@ config.target_triple = "@TARGET_TRIPLE@" config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ +config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. Index: clang-tools-extra/test/lit.cfg.py =================================================================== --- clang-tools-extra/test/lit.cfg.py +++ clang-tools-extra/test/lit.cfg.py @@ -155,3 +155,6 @@ # Plugins (loadable modules) if config.has_plugins and config.llvm_plugin_ext: config.available_features.add('plugins') + +if config.has_llvm_hello: + config.available_features.add("llvm-hello") Index: clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +++ clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp @@ -1,4 +1,4 @@ -// REQUIRES: plugins +// REQUIRES: plugins, llvm-hello // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s // CHECK-LIST: Enabled checks: // CHECK-LIST-NEXT: mytest1 Index: clang-tools-extra/test/CMakeLists.txt =================================================================== --- clang-tools-extra/test/CMakeLists.txt +++ clang-tools-extra/test/CMakeLists.txt @@ -15,10 +15,15 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +if (TARGET LLVMHello) + set (LLVM_HAS_LLVM_HELLO 1) +endif() + llvm_canonicalize_cmake_booleans( CLANG_TIDY_ENABLE_STATIC_ANALYZER CLANG_PLUGIN_SUPPORT LLVM_INSTALL_TOOLCHAIN_ONLY + LLVM_HAS_LLVM_HELLO ) configure_lit_site_cfg( @@ -97,7 +102,10 @@ endif() if(TARGET CTTestTidyModule) - list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) + list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) + if (TARGET LLVMHello) + list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) + endif() target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) set(LLVM_LINK_COMPONENTS
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits