[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 05:21:20 PDT 2025
================
@@ -0,0 +1,28 @@
+if(APPLE)
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lldb-dap-Info.plist.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist
+ )
+ # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist")
+endif()
+
+add_lldb_tool(lldb-dap
+ lldb-dap.cpp
+
+ LINK_LIBS
+ lldbDAP
+ )
+
----------------
da-viper wrote:
```suggestion
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:-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist)
endif()
```
use [target_link_option](https://cmake.org/cmake/help/latest/prop_tgt/LINK_OPTIONS.html#prop_tgt:LINK_OPTIONS) .
https://github.com/llvm/llvm-project/pull/139402
More information about the lldb-commits
mailing list