[PATCH] D150144: cmake: add missing dependency on Attributes.inc

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 04:57:17 PDT 2023


chapuni added a comment.

Since D74106 <https://reviews.llvm.org/D74106>, `target_link_libraries(PRIVATE)` brings dependencies on generated headers.
I would like to suggest specifying `Core` to require usage of `intrinsics_gen`, unless linking to `Core` wants to be avoided.



================
Comment at: llvm/unittests/Analysis/CMakeLists.txt:67
 
+add_dependencies(AnalysisTests intrinsics_gen)
+
----------------
This is covered by `LINK_COMPONENTS Core`


================
Comment at: llvm/utils/TableGen/CMakeLists.txt:90-91
+
+  DEPENDS
+  attributes_gen
   )
----------------
bulbazord wrote:
> bulbazord wrote:
> > Is this right? llvm-tblgen depends on a file generated by llvm-tblgen?
> Ok, I looked into this further. All the headers that get generated (everything in `llvm/include/llvm/`) are generated by `llvm-min-tblgen`, which is defined above. It **does** make sense for `llvm-tblgen` to depend on `attributes_gen`. This is not a concern anymore.
@jroelofs Could you explain its motivation or background, please?

AFAIK this is redundant in normal build. I have confirmed ToT `llvm-tblgen` doesn't depend on `Core` or `intrinsics_gen`.

I've noticed it might be required with `LLVM_ENABLE_MODULES`.  Not certain yet though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150144/new/

https://reviews.llvm.org/D150144



More information about the llvm-commits mailing list