[Lldb-commits] [PATCH] D48060: Introduce lldb-framework CMake target and centralize its logic

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 15 13:32:05 PDT 2018


labath added a comment.

This is looking very good, I just have one more  quick question. I am wondering whether we couldn't simplify this dependency management a tad bit more. Would the thing I'm proposing below work for you?



================
Comment at: CMakeLists.txt:147-153
+  if (LLDB_CAN_USE_LLDB_SERVER)
+    add_dependencies(lldb-suite lldb-server)
+  endif()
+  if (LLDB_CAN_USE_DEBUGSERVER)
+    add_dependencies(lldb-suite debugserver)
+  endif()
+  add_dependencies(lldb-suite liblldb lldb-argdumper)
----------------
This code here.


================
Comment at: cmake/modules/AddLLDB.cmake:102-104
   if(LLDB_BUILD_FRAMEWORK)
     if(ARG_INCLUDE_IN_FRAMEWORK)
+      add_dependencies(lldb-framework ${name})
----------------
If you reorder this slightly, then you should be able to get rid of the extra dependency code in main CMakeLists.txt.
Something like this:
```
if (ARG_INCLUDE_IN_FRAMEWORK)
  add_dependencies(lldb-suite ${name})
  if (LLDB_BUILD_FRAMEWORK)
    ...
```

(of course, then the INCLUDE_IN_FRAMEWORK arg will become misnamed, but that can be solved by renaming it to INCLUDE_IN_SUITE)


https://reviews.llvm.org/D48060





More information about the lldb-commits mailing list