Skip to content

[lldb/cmake] Remove special handling of OBJECT libraries #141066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025

Conversation

labath
Copy link
Collaborator

@labath labath commented May 22, 2025

Nothing in lldb sets this. And even if they did, llvm_add_library should know how to handle that.

@labath labath requested a review from DavidSpickett May 22, 2025 13:51
@labath labath requested a review from JDevlieghere as a code owner May 22, 2025 13:51
@llvmbot llvmbot added the lldb label May 22, 2025
@llvmbot
Copy link
Member

llvmbot commented May 22, 2025

@llvm/pr-subscribers-lldb

Author: Pavel Labath (labath)

Changes

Nothing in lldb sets this. And even if they did, llvm_add_library should know how to handle that.


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

1 Files Affected:

  • (modified) lldb/cmake/modules/AddLLDB.cmake (+16-20)
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 0a81ec5092185..cd6ce47ca5ca2 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -100,29 +100,25 @@ function(add_lldb_library name)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
   endif()
 
-  if (PARAM_OBJECT)
-    add_library(${name} ${libkind} ${srcs})
-  else()
-    if(PARAM_ENTITLEMENTS)
-      set(pass_ENTITLEMENTS ENTITLEMENTS ${PARAM_ENTITLEMENTS})
-    endif()
+  if(PARAM_ENTITLEMENTS)
+    set(pass_ENTITLEMENTS ENTITLEMENTS ${PARAM_ENTITLEMENTS})
+  endif()
 
-    if(LLDB_NO_INSTALL_DEFAULT_RPATH)
-      set(pass_NO_INSTALL_RPATH NO_INSTALL_RPATH)
-    endif()
+  if(LLDB_NO_INSTALL_DEFAULT_RPATH)
+    set(pass_NO_INSTALL_RPATH NO_INSTALL_RPATH)
+  endif()
 
-    llvm_add_library(${name} ${libkind} ${srcs}
-      LINK_LIBS ${PARAM_LINK_LIBS}
-      DEPENDS ${PARAM_DEPENDS}
-      ${pass_ENTITLEMENTS}
-      ${pass_NO_INSTALL_RPATH}
-    )
+  llvm_add_library(${name} ${libkind} ${srcs}
+    LINK_LIBS ${PARAM_LINK_LIBS}
+    DEPENDS ${PARAM_DEPENDS}
+    ${pass_ENTITLEMENTS}
+    ${pass_NO_INSTALL_RPATH}
+  )
 
-    if(CLANG_LINK_CLANG_DYLIB)
-      target_link_libraries(${name} PRIVATE clang-cpp)
-    else()
-      target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS})
-    endif()
+  if(CLANG_LINK_CLANG_DYLIB)
+    target_link_libraries(${name} PRIVATE clang-cpp)
+  else()
+    target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS})
   endif()
 
   # A target cannot be changed to a FRAMEWORK after calling install() because

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful

Nothing in lldb sets this. And even if they did, llvm_add_library should
know how to handle that.
@labath labath merged commit a4380fe into llvm:main May 23, 2025
10 checks passed
@labath labath deleted the cmake2 branch May 23, 2025 08:23
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Nothing in lldb sets this. And even if they did, llvm_add_library should
know how to handle that.
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.

4 participants