[PATCH] D65818: Add order-dependencies to object libraries

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 10:19:01 PDT 2019


beanz created this revision.
beanz added reviewers: compnerd, hintonda, smeenai.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.

If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65818

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -448,6 +448,9 @@
     list(APPEND objlibs ${obj_name})
 
     set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
+    if(ARG_DEPENDS)
+      add_dependencies(${obj_name} ${ARG_DEPENDS})
+    endif()
   endif()
 
   if(ARG_SHARED AND ARG_STATIC)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65818.213655.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190806/0addde67/attachment.bin>


More information about the llvm-commits mailing list