mlir-sys icon indicating copy to clipboard operation
mlir-sys copied to clipboard

Add a bundled mode to download LLVM automatically in the build.rs

Open marcantoinem opened this issue 7 months ago • 1 comments

I'm writing a CPU backend in https://github.com/tracel-ai/cubecl and I needed to make mlir-sys a bit more portable and add a way to not depend on the system installation of llvm which could not be the good version. I wrote a crate to add this capability to tblgen-rs also. https://github.com/marcantoinem/llvm-bundler-rs The crates use a github action to get a specific version llvm compile it and compress it into a Github release that is then downloaded during compilation. I would love to merge it upstream. It also contains fixes to allow static linking for MLIR by reading the mlir dependency cmake and doing a topological sort. I would like to move this crate in the mlir-rs organisation to make it more trustworthy.

It also support only linux for the moment, but I will add MacOs and Windows support soon.

marcantoinem avatar Jun 11 '25 23:06 marcantoinem

Thanks for this! Sorry for delay in looking at this.

femtomc avatar Sep 16 '25 14:09 femtomc