Author: David Spickett Date: 2025-12-02T11:05:55Z New Revision: 2f86bc207af7a5bd766d4d224c30851d5ced5999
URL: https://github.com/llvm/llvm-project/commit/2f86bc207af7a5bd766d4d224c30851d5ced5999 DIFF: https://github.com/llvm/llvm-project/commit/2f86bc207af7a5bd766d4d224c30851d5ced5999.diff LOG: [clang] Only build c-index-test and apinotes-test when clang tests are included (#151157) Those programs are only used for testing, and it's used in tests that are already guarded by CLANG_INCLUDE_TESTS in clang/CMakeLists.txt. This change enables us to do builds with LLVM_INSTALL_TOOLCHAIN_ONLY=OFF, and CLANG_INCLUDE_TESTS=OFF, which contain the required files to build other bits of llvm-project standalone, but do not include those unnecessary testing programs. Added: Modified: clang/tools/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/tools/CMakeLists.txt b/clang/tools/CMakeLists.txt index 7a7c56ae217b0..afdd613b4ee99 100644 --- a/clang/tools/CMakeLists.txt +++ b/clang/tools/CMakeLists.txt @@ -2,7 +2,6 @@ create_subdirectory_options(CLANG TOOL) add_clang_subdirectory(diagtool) add_clang_subdirectory(driver) -add_clang_subdirectory(apinotes-test) if(CLANG_ENABLE_CIR) add_clang_subdirectory(cir-opt) add_clang_subdirectory(cir-translate) @@ -22,7 +21,10 @@ if(HAVE_CLANG_REPL_SUPPORT) add_clang_subdirectory(clang-repl) endif() -add_clang_subdirectory(c-index-test) +if(CLANG_INCLUDE_TESTS) + add_clang_subdirectory(c-index-test) + add_clang_subdirectory(apinotes-test) +endif() add_clang_subdirectory(clang-refactor) # For MinGW/Cygwin we only enable shared library if LLVM_LINK_LLVM_DYLIB=ON. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
