[clang-tools-extra] fa79c23 - [clang-tidy] Fix linking regression in clangTidyLLVMModule (#150769)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 26 08:22:21 PDT 2025


Author: Michał Górny
Date: 2025-07-26T17:22:18+02:00
New Revision: fa79c23ecc23d6e8a6956d9caedd0443ecdb5853

URL: https://github.com/llvm/llvm-project/commit/fa79c23ecc23d6e8a6956d9caedd0443ecdb5853
DIFF: https://github.com/llvm/llvm-project/commit/fa79c23ecc23d6e8a6956d9caedd0443ecdb5853.diff

LOG: [clang-tidy] Fix linking regression in clangTidyLLVMModule (#150769)

Fix the regression introduced in #149148 that incorrectly explicitly
linked `clangTransformer` when dylib was used. As a result, the
executables linking to `clangTidyLLVMModule` would end up linking both
the dylib and a number of static clang libraries, leading to complete
mayhem and undecipherable segmentation faults.

Signed-off-by: Michał Górny <mgorny at gentoo.org>

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt b/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
index 4f1da43d3f1b7..41386cdb55b1f 100644
--- a/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
@@ -17,7 +17,6 @@ add_clang_library(clangTidyLLVMModule STATIC
   clangTidy
   clangTidyReadabilityModule
   clangTidyUtils
-  clangTransformer
 
   DEPENDS
   omp_gen
@@ -31,4 +30,5 @@ clang_target_link_libraries(clangTidyLLVMModule
   clangBasic
   clangLex
   clangTooling
+  clangTransformer
   )


        


More information about the cfe-commits mailing list