https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/186475
The ClangScalableAnalysisTests target was missing a link dependency on clangBasic, causing linker failures on shared library builds where transitive dependencies are not automatically resolved. Fixes https://github.com/llvm/llvm-project/pull/186442#issuecomment-4056922413 https://lab.llvm.org/buildbot/#/builders/10/builds/24522 ``` AILED: tools/clang/unittests/ScalableStaticAnalysisFramework/ClangScalableAnalysisTests /usr/bin/ld: tools/clang/unittests/ScalableStaticAnalysisFramework/CMakeFiles/ClangScalableAnalysisTests.dir/ASTEntityMappingTest.cpp.o: undefined reference to symbol '_ZNK5clang19AttributeCommonInfo35calculateAttributeSpellingListIndexEv' /usr/bin/ld: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/libclangBasic.so.23.0git: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status [329/334] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/CodeCompletionTest.cpp.o [330/334] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/IncrementalProcessingTest.cpp.o [331/334] Linking CXX executable tools/clang/unittests/Sema/SemaTests [332/334] Linking CXX executable tools/clang/unittests/AllClangUnitTests ninja: build stopped: subcommand failed. ``` Assisted-By: claude From 112d80e8bfd1b34f11dd510938365bec9833fa38 Mon Sep 17 00:00:00 2001 From: Balazs Benics <[email protected]> Date: Fri, 13 Mar 2026 17:56:57 +0000 Subject: [PATCH] [SSAF] Fix shared library build by adding missing clangBasic dependency The ClangScalableAnalysisTests target was missing a link dependency on clangBasic, causing linker failures on shared library builds where transitive dependencies are not automatically resolved. Fixes https://github.com/llvm/llvm-project/pull/186442#issuecomment-4056922413 https://lab.llvm.org/buildbot/#/builders/10/builds/24522 ``` AILED: tools/clang/unittests/ScalableStaticAnalysisFramework/ClangScalableAnalysisTests /usr/bin/ld: tools/clang/unittests/ScalableStaticAnalysisFramework/CMakeFiles/ClangScalableAnalysisTests.dir/ASTEntityMappingTest.cpp.o: undefined reference to symbol '_ZNK5clang19AttributeCommonInfo35calculateAttributeSpellingListIndexEv' /usr/bin/ld: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/libclangBasic.so.23.0git: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status [329/334] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/CodeCompletionTest.cpp.o [330/334] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/IncrementalProcessingTest.cpp.o [331/334] Linking CXX executable tools/clang/unittests/Sema/SemaTests [332/334] Linking CXX executable tools/clang/unittests/AllClangUnitTests ninja: build stopped: subcommand failed. ``` Assisted-By: claude --- clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt | 1 + .../clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn | 1 + 2 files changed, 2 insertions(+) diff --git a/clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt b/clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt index f7ab9c24f3723..7652ebb390f86 100644 --- a/clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt +++ b/clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt @@ -26,6 +26,7 @@ add_distinct_clang_unittest(ClangScalableAnalysisTests CLANG_LIBS clangAST clangASTMatchers + clangBasic clangFrontend clangScalableStaticAnalysisFrameworkCore clangSerialization diff --git a/llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn index 8e19ddf03dd77..6eec474ed4a35 100644 --- a/llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn @@ -5,6 +5,7 @@ unittest("ClangScalableAnalysisTests") { deps = [ "//clang/lib/AST", "//clang/lib/ASTMatchers", + "//clang/lib/Basic", "//clang/lib/Frontend", "//clang/lib/ScalableStaticAnalysisFramework/Core", "//clang/lib/Serialization", _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
