Maybe let me make my question clearer?
I am working on some cross-compilation work and the kernel is gonna be integrated to a C/C++ project.
An ideal interface that generates the kernel for me should be a pair of (.o, .h).
Even more aggressively, I want a pair of (.ll, .h) since I want to run some customized passes on the generated LLVM IR.