Skip to content

Conversation

@bulbazord
Copy link
Member

The ValueObject library doesn't actually depend on any plugins currently, but it links against the C++ and ObjC language plugins. I removed those and added NO_PLUGIN_DEPENDENCIES.

However, the build failed initally because the Commands library depends on clangFrontend and it was previously getting it transitively through ValueObject -> C++/ObjC Language -> clangFrontend. This makes the dependency more explicit.

The ValueObject library doesn't actually depend on any plugins currently, but it
links against the C++ and ObjC language plugins. I removed those and
added NO_PLUGIN_DEPENDENCIES.

However, the build failed initally because the Commands library depends
on clangFrontend and it was previously getting it transitively through
ValueObject -> C++/ObjC Language -> clangFrontend. This makes the
dependency more explicit.
@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)

Changes

The ValueObject library doesn't actually depend on any plugins currently, but it links against the C++ and ObjC language plugins. I removed those and added NO_PLUGIN_DEPENDENCIES.

However, the build failed initally because the Commands library depends on clangFrontend and it was previously getting it transitively through ValueObject -> C++/ObjC Language -> clangFrontend. This makes the dependency more explicit.


Full diff: https://github.com/llvm/llvm-project/pull/167794.diff

2 Files Affected:

  • (modified) lldb/source/Commands/CMakeLists.txt (+2)
  • (modified) lldb/source/ValueObject/CMakeLists.txt (+1-3)
diff --git a/lldb/source/Commands/CMakeLists.txt b/lldb/source/Commands/CMakeLists.txt
index 69e4c45f0b8e5..33332f2d59a23 100644
--- a/lldb/source/Commands/CMakeLists.txt
+++ b/lldb/source/Commands/CMakeLists.txt
@@ -58,6 +58,8 @@ add_lldb_library(lldbCommands NO_PLUGIN_DEPENDENCIES
     lldbUtility
     lldbValueObject
     lldbVersion
+  CLANG_LIBS
+    clangFrontend
   )
 
 add_dependencies(lldbCommands LLDBOptionsGen)
diff --git a/lldb/source/ValueObject/CMakeLists.txt b/lldb/source/ValueObject/CMakeLists.txt
index 2a61407521bec..f0fe7f374a506 100644
--- a/lldb/source/ValueObject/CMakeLists.txt
+++ b/lldb/source/ValueObject/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_lldb_library(lldbValueObject
+add_lldb_library(lldbValueObject NO_PLUGIN_DEPENDENCIES
   DILAST.cpp
   DILEval.cpp
   DILLexer.cpp
@@ -34,6 +34,4 @@ add_lldb_library(lldbValueObject
     lldbSymbol
     lldbTarget
     lldbUtility
-    lldbPluginCPlusPlusLanguage
-    lldbPluginObjCLanguage
   )

@bulbazord bulbazord merged commit 45d5e7b into llvm:main Nov 13, 2025
12 checks passed
@bulbazord bulbazord deleted the value-object-no-plugins branch November 13, 2025 00:19
git-crd pushed a commit to git-crd/crd-llvm-project that referenced this pull request Nov 13, 2025
…m#167794)

The ValueObject library doesn't actually depend on any plugins
currently, but it links against the C++ and ObjC language plugins. I
removed those and added NO_PLUGIN_DEPENDENCIES.

However, the build failed initally because the Commands library depends
on clangFrontend and it was previously getting it transitively through
ValueObject -> C++/ObjC Language -> clangFrontend. This makes the
dependency more explicit.
@kparzysz
Copy link
Contributor

This breaks a build with BUILD_SHARED_LIBS=ON:

/usr/bin/ld: lib/liblldbCommands.a(CommandObjectTarget.cpp.o): undefined reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev

I tried adding a dependency on clangSerialization to lldb/source/Command, but it triggered a new series of linker errors with a different symbol (clang::getClangRevisionabi:cxx11). Adding a dependency on clangBasic to lldb/source/Version replaced that with another set of errors. At this point I gave up.

kparzysz added a commit that referenced this pull request Nov 13, 2025
…IES" (#167886)

Reverts #167794

This breaks a build with BUILD_SHARED_LIBS=ON:

/usr/bin/ld: lib/liblldbCommands.a(CommandObjectTarget.cpp.o): undefined
reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev

Fixing that issue leads to similar failures due to different symbols.
@Michael137
Copy link
Member

Why does Command need to link against clang? Is this just for CommandObjectTargetModulesDumpClangPCMInfo?

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Nov 13, 2025
…N_DEPENDENCIES" (#167886)

Reverts llvm/llvm-project#167794

This breaks a build with BUILD_SHARED_LIBS=ON:

/usr/bin/ld: lib/liblldbCommands.a(CommandObjectTarget.cpp.o): undefined
reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev

Fixing that issue leads to similar failures due to different symbols.
@bulbazord
Copy link
Member Author

Why does Command need to link against clang? Is this just for CommandObjectTargetModulesDumpClangPCMInfo?

Yes, that's the only reason.

@jimingham
Copy link
Collaborator

Why does Command need to link against clang? Is this just for CommandObjectTargetModulesDumpClangPCMInfo?

Yes, that's the only reason.

That seems like it should be a plugin ... command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants