erichkeane wrote:

> > That said, ergonomically, I think detecting 'we added this because a 
> > different project needs it' anything automatically is going to be 
> > problematic?
> 
> I don't quite follow, can you expand?

Sure!  My opinion is adding MLIR, automatically or not to 
`LLVM_ENABLE_PROJECTS` should build the whole thing, but with some sort of 'opt 
in' to only building the minimum.  The thought is that downstreams who want to 
use a minimal MLIR shouldn't have to modify the LLVM cmake files for their 
project.

So:
`LLVM_ENABLE_PROJECTS=mlir` would just always build all of MLIR.
`LLVM_ENABLE_PROJECTS=mlir -DMLIR_STANDALONE=On` (or whatever name) would do 
this.

AND in our LLVM Cmake files, in addition to adding `mlir` to the 
`LLVM_ENABLE_PROJECTS` list, we ALSO set the `standalone` flag (or whatever 
name is appropriate).

The idea/hope is that projects downstream could ALSO take advantage of this 
build time opt.

https://github.com/llvm/llvm-project/pull/221724
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to