[PATCH] D78340: [Flang] fix dependency issues after D78215

Stephen Neuendorffer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 07:32:19 PDT 2020


stephenneuendorffer added inline comments.


================
Comment at: flang/lib/Optimizer/Dialect/CMakeLists.txt:9
   FIROpsIncGen
+  FIRSupport
 
----------------
clementval wrote:
> ChinouneMehdi wrote:
> > clementval wrote:
> > > ChinouneMehdi wrote:
> > > > FortranSupport is already declared as a dependency, why!
> > > Compile time dependency and link time dependency are not the same. 
> > Your problem was occurring with FIRSupport, so why introducing this dependency to FIRDialect?
> Obviously, I didn't attached the 5-6 errors occurring. The change I posted in this patch are needed at least on the system I used to compile Flang (Summit node). 
This should not be necessary since FIRSupport is a library dependency.


================
Comment at: flang/lib/Optimizer/Support/CMakeLists.txt:6-7
 
+  DEPENDS
+  ${dialect_libs}
   LINK_LIBS
----------------
clementval wrote:
> ChinouneMehdi wrote:
> > clementval wrote:
> > > ChinouneMehdi wrote:
> > > > Same here!
> > > This is needed as this is a compile time dependency as well. Before your patch everything was compiling fine. But not after it. Those change are fixing the problem your introduced on the system I use at least. 
> > The problem was because of a file that wasn't generated before building FIRSupport, so to fix the problem it suffices to introduce a dependency on it ( implicitly or explicitly).
> I agree with this ... those file are generated by Tablegen so of course we can put those dependency here but it is not cleaner to depends on the dialects since they are ultimately generating those files and these are the dependencies one would see when looking at the header in FIRSupport and FIRDialect?
Cmake *should* generate dependencies to ensure that the tablegen files are generate before the dialect, even if the libraries are not specified as explicit dependencies.  I suspect there is something else going on here.  What version of cmake and what configuration are you using?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78340





More information about the llvm-commits mailing list