[Lldb-commits] [lldb] [lldb-dap] Split lldb-dap into library and tool (NFC) (PR #139402)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Sun May 11 12:25:35 PDT 2025


================
@@ -0,0 +1,28 @@
+add_lldb_tool(lldb-dap
+  lldb-dap.cpp
+
+  LINK_LIBS
+    lldbDAP
+  )
+
+if(APPLE)
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/lldb-dap-Info.plist.in
+    ${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist
+    )
+  target_link_options(lldb-dap
+    PRIVATE LINKER:-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist)
----------------
da-viper wrote:

I don't think we need the `-Wl` flag

> For example, "LINKER:-z,defs" becomes -Xlinker -z -Xlinker defs for Clang and -Wl,-z,defs for GNU GCC.

>From https://cmake.org/cmake/help/latest/prop_tgt/LINK_OPTIONS.html#handling-compiler-driver-differences

you can use `otool -s __TEXT __info_plist /path/to/lldb-dap` to confirm it was added. Cannot confirm since I do not have a mac. 

https://github.com/llvm/llvm-project/pull/139402


More information about the lldb-commits mailing list