Skip to content

Conversation

@JDevlieghere
Copy link
Member

I can't figure out why this would be necessary. Nothing is checking if libpthread is available, nothing in lldb-dap is relying on libpthread directly and nothing else in LLDB is doing this.

I can't figure out why this would be necessary. Nothing is checking if
libpthread is available, nothing in lldb-dap is relying on libpthread
directly and nothing else in LLDB is doing this.
@llvmbot
Copy link
Member

llvmbot commented Mar 19, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

I can't figure out why this would be necessary. Nothing is checking if libpthread is available, nothing in lldb-dap is relying on libpthread directly and nothing else in LLDB is doing this.


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

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/CMakeLists.txt (+1-7)
diff --git a/lldb/tools/lldb-dap/CMakeLists.txt b/lldb/tools/lldb-dap/CMakeLists.txt
index adad75a79fa7a..77547abb4298c 100644
--- a/lldb/tools/lldb-dap/CMakeLists.txt
+++ b/lldb/tools/lldb-dap/CMakeLists.txt
@@ -1,8 +1,3 @@
-if (HAVE_LIBPTHREAD)
-  list(APPEND extra_libs pthread)
-endif ()
-
-
 if(APPLE)
   configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/lldb-dap-Info.plist.in
@@ -73,7 +68,7 @@ add_lldb_tool(lldb-dap
   Handler/TestGetTargetBreakpointsRequestHandler.cpp
   Handler/ThreadsRequestHandler.cpp
   Handler/VariablesRequestHandler.cpp
-  
+
   Protocol/ProtocolBase.cpp
   Protocol/ProtocolTypes.cpp
   Protocol/ProtocolRequests.cpp
@@ -81,7 +76,6 @@ add_lldb_tool(lldb-dap
   LINK_LIBS
     liblldb
     lldbHost
-    ${extra_libs}
 
   LINK_COMPONENTS
     Option

Copy link
Contributor

@ashgti ashgti left a comment

Choose a reason for hiding this comment

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

Looking around llvm is this the only place using that check? Could this be cleaned up in other places as well?

@JDevlieghere
Copy link
Member Author

JDevlieghere commented Mar 19, 2025

Looking around llvm is this the only place using that check? Could this be cleaned up in other places as well?

Yeah, I can't find any other uses. Let me remove that in a separate PR.

It is used, amongst other things to decide whether to use the pthread implementation for the RWMutex on Darwin: https://github.com/llvm/llvm-project/blob/main/llvm/cmake/config-ix.cmake#L136

@JDevlieghere JDevlieghere merged commit 2e5a751 into llvm:main Mar 19, 2025
10 of 12 checks passed
@JDevlieghere JDevlieghere deleted the remove-libpthread branch March 19, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants