use il2cpp to prebuild a C++ lib then included in another unity project?

I wrote a managed dll and use it in every unity projects in every platforms, since il2cpp cost a lot of time converting, is it possible that I can use il2cpp command line to pre-build my dll as C++ lib, and then use the C++ lib in any other unity projects in for instance… iOS platform??

any documents for this?? all the search I can find is an old command line example that is out of date…

Thanks

No, this kind of workflow is not supported. IL2CPP requires that it can convert all managed assemblies that will be used at the same time. It does this to provide some optimizations for the final executable size that are not possible with separate compilation.

Note that IL2CPP does support incremental compilation on iOS, so you should only need to compile the generated C++ code for this managed assembly once per project. After that, it won’t recompile if nothing changes.