Page MenuHomePhabricator

[mlir] Improve LLVM shlib support

Authored by serge-sans-paille on Oct 5 2020, 12:46 PM.



mlir-tblgen was incompatible with libLLVM, due to explicit linkage with libLLVMSupport etc.
As it cannot link with libLLVM, make sure all lib it uses are not using libLLVM either.

As a side effect, also remove some explicit references to LLVM libs and use components instead.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2020, 12:46 PM
serge-sans-paille requested review of this revision.Oct 5 2020, 12:46 PM

Thanks for this!


Good catch!

This revision is now accepted and ready to land.Oct 8 2020, 10:54 AM
vchuravy accepted this revision.Oct 8 2020, 11:52 AM
This revision was automatically updated to reflect the committed changes.
awarzynski added a subscriber: awarzynski.EditedOct 9 2020, 3:01 AM

Hi @serge-sans-paille, thanks for working on this!

Sadly, our Flang buildbots that set BUILD_SHARED_LIBS to ON are currently failing, e.g. These buildbots are still in the staging area so no notifications are sent. Also, there have been other breaking changes submitted and subsequently reverted recently, so it's not obvious that _this_ is the problematic change. I wish that we had better and more robust pre-commit testing :)

Anyway, I reverted the changes in mlir/tools/mlir-tblgen/CMakeLists.txt locally and that fixed the build for me: Please, could you take a look? I'm not that familiar with the CMake magic happening here (though to me this patch looks good!). Thank you!