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

David Truby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 08:05:27 PDT 2020


DavidTruby added a comment.

@ChinouneMehdi can you tell me which compiler and linker you're seeing issues with with this patch? I'd like to try and reproduce.

We seem to be in a situation where the previous patch fixed some builds and broke some others, and this does the reverse. Hopefully we can come to something that doesn't break either build!



================
Comment at: flang/lib/Optimizer/Support/CMakeLists.txt:6-7
 
+  DEPENDS
+  ${dialect_libs}
   LINK_LIBS
----------------
clementval wrote:
> stephenneuendorffer wrote:
> > 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?
> Well unfortunately it does not and this fixes it. I use Cmake 3.15.2 with GNU 7.5 on a Power9 with 64 thread to compile. 
> 
> 
I'll try and reproduce this error as I didn't see it yesterday (I wasn't using gcc 7). Which linker were you using, the default (bfd)?


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