================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to