[flang] Add missing dependencies for flang/lib/Optimizer/Dialect
authorPeter Steinfeld <psteinfeld@nvidia.com>
Fri, 10 Mar 2023 21:03:52 +0000 (13:03 -0800)
committerPeter Steinfeld <psteinfeld@nvidia.com>
Fri, 10 Mar 2023 21:43:03 +0000 (13:43 -0800)
Patch D145640 wasn't building for me because .cpp files in
flang/lib/Optimizer/Dialect depend on the files generated in
.../build/include/llfm/IR.  But the .cpp file compilations were being
done before the needed include files were generated.

This patch fixes that by adding dependencies on "intrinsics_gen" to the
CMake files in two directories.

Differential Revision: https://reviews.llvm.org/D145825

flang/lib/Optimizer/Dialect/CMakeLists.txt
flang/lib/Optimizer/Dialect/Support/CMakeLists.txt

index 58cecaa..342a9d1 100644 (file)
@@ -12,6 +12,7 @@ add_flang_library(FIRDialect
   CanonicalizationPatternsIncGen
   MLIRIR
   FIROpsIncGen
+  intrinsics_gen
 
   LINK_LIBS
   FIRDialectSupport
index 352588f..c37b054 100644 (file)
@@ -6,6 +6,7 @@ add_flang_library(FIRDialectSupport
 
   DEPENDS
   MLIRIR
+  intrinsics_gen
 
   LINK_LIBS
   ${dialect_libs}