[flang] fix shared library builds after D136428
authorJean Perier <jperier@nvidia.com>
Fri, 21 Oct 2022 11:43:03 +0000 (04:43 -0700)
committerJean Perier <jperier@nvidia.com>
Fri, 21 Oct 2022 11:43:03 +0000 (04:43 -0700)
https://reviews.llvm.org/D136428 introduced the need for FIRBuilder
library to link against HLFIRDialect to satisfy shared builds.

The PrintFlangFunctionNames failure is unrelated, it is a build
race because many of the headers included in FrontendAction are
tablegen generated. So PrintFlangFunctionNames must wait until its
headers can be safely used. See
https://lab.llvm.org/buildbot/#/builders/191/builds/10340

flang/examples/PrintFlangFunctionNames/CMakeLists.txt
flang/lib/Optimizer/Builder/CMakeLists.txt

index 490f2ea..7ba91fa 100644 (file)
@@ -6,5 +6,6 @@ add_llvm_library(flangPrintFunctionNames
 
     DEPENDS
     acc_gen
+    flangFrontend
     omp_gen
 )
index bd12fc2..2ace58a 100644 (file)
@@ -24,10 +24,12 @@ add_flang_library(FIRBuilder
   DEPENDS
   FIRDialect
   FIRSupport
+  HLFIRDialect
   ${dialect_libs}
 
   LINK_LIBS
   FIRDialect
   FIRSupport
+  HLFIRDialect
   ${dialect_libs}
 )