[flang-commits] [flang] [flang] Fix build on different of cores from #164630 (PR #164841)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Oct 24 02:35:58 PDT 2025
https://github.com/tblah requested changes to this pull request.
Thank you for taking time for looking into this but I don't think this is the whole right fix yet. The error message in https://github.com/llvm/llvm-project/issues/164630 would indicate a _missing_ dependency between whatever is including `MIFDialect.h` and the CMake task which is generating the table gen parts of that header (MIFDialect).
I had a quick look and I see that the header file is included from flang/include/flang/Optimizer/Support/InitFIR.h. FIRSupport has no dependency upon MIFDialect and so there is no guarantee that it will be built after MIFDialect.
I think removing the dependency from MIFDialect to FIRSupport makes the issue much less likely (because CMake won't be trying to build FIRSupport before it has built MIFDialect) but it doesn't guarantee that the build order will be correct in the future.
Beware that the dependency is created by the presence of the include in a header (InitFIR.h) and so every library that includes InitFIR.h will also depend upon MIFDialect. However, they should already have a dependency on FIRSupport so it should come through transitively once FIRSupport has the right dependency.
I hope that made sense. Please feel free to ask me questions here or on the flang slack if I can help at all :)
https://github.com/llvm/llvm-project/pull/164841
More information about the flang-commits
mailing list