[PATCH] D78771: Add dependency edges between generated headers and users
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 21:42:38 PDT 2020
mehdi_amini added inline comments.
================
Comment at: mlir/lib/Analysis/CMakeLists.txt:24
+ DEPENDS
+ MLIRCallInterfacesIncGen
+ MLIRLoopLikeInterfaceIncGen
----------------
vchuravy wrote:
> rriddle wrote:
> > This seems really annoying if necessary. There is already an explicit library for the dependency, e.g. MLIRCallInterfaces, this seems redundant and exposes things that shouldn't necessarily need to be exposed.
> Yeah it is really annoying...
>
> I had to add these for https://reviews.llvm.org/D78773 so it my be an issue with that PR.
>
> To reproduce on D78773, this should be enough
> ```
> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON ../llvm
> ninja
> ```
@rriddle as far as I understand we need the `DEPENDS` directive to express a that target must be built (here generated headers) before you build the source for this library, while the `target_link_libraries`dependency only induces a link-time dependency.
That said different version of CMake (or different environments?) seem to behave differently on this, in the past @stephenneuendorffer observed different dependency than me.
For example right now for me `ninja clean && ninja tools/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/CallGraph.cpp.o -nv | grep CallInterfaces` shows that these dependency are already there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78771/new/
https://reviews.llvm.org/D78771
More information about the llvm-commits
mailing list