This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add missing CMake deps to mlir-pdll
ClosedPublic

Authored by marbre on May 3 2022, 5:59 AM.

Diff Detail

Event Timeline

marbre created this revision.May 3 2022, 5:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 5:59 AM
marbre requested review of this revision.May 3 2022, 5:59 AM
marbre added a comment.May 3 2022, 6:56 AM

The missing dep on MLIRIR actually showed up as a race condition in the build process on a GH runner.

rriddle accepted this revision.May 3 2022, 9:48 AM

Thanks!

This revision is now accepted and ready to land.May 3 2022, 9:48 AM
This revision was automatically updated to reflect the committed changes.
nikic added a subscriber: nikic.May 5 2022, 6:01 AM

I'm still seeing build failures due to mlir-pdll of the kind:

/builddir/build/BUILD/llvm-project-15.0.0.src/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h:279:10: fatal error: mlir/IR/BuiltinAttributeInterfaces.h.inc: No such file or directory

I'm not sure what the exact meaning of target_link_libraries is, but I guess it only requires the library to be built before mlir-pdll is linked, but mlit-pdll.cpp.o still gets built before mlir/include/IR tablegen headers are generated, on which it depends.

Looks like mlir-pdll is unlike other tablegen targets in that it depends on tablegened files itself.

nikic added a comment.May 5 2022, 7:05 AM

It seems that the reproducer for the build failure is basically "use make instead of ninja". I've put up https://reviews.llvm.org/D125010 with a fix, though I'm not very confident with cmake, so not sure this is the right thing to do.