https://github.com/kuhar requested changes to this pull request. I agree with @joker-eph, the link stage should be done at the mlir-opt level, unless we have a very good reason for linking llvm IR over MLIR https://github.com/llvm/llvm-project/pull/114563