Quantcast
Channel: Answers by "gfoot"
Viewing all articles
Browse latest Browse all 95

Answer by gfoot

$
0
0
Full AOT compilation is not supported by Mono on all platforms. Last time I investigated (years ago...) it was supported on amd64, but not x86. So you can perform these tests on 64-bit Intel-based platforms, but not 32-bit ones. Also, the errors you get on amd64 are not exactly the same as the ones on iOS - I have seen code that works on one but not the other, in both directions. I also don't remember full details of the method, but hopefully this will give you a start... You use the Mono compiler that comes with Unity - or download a newer version if you like - to process a compiled assembly (DLL or EXE) and precompile as much as possible to native code: mono --aot=full mytestapp.exe This generates a compiled version of the assembly that lives alongside it. Mono requires both the original assembly and the compiled version to be present at runtime. Then you need to use mono again when you run your test app, to force the runtime to throw exceptions if JIT is ever required: mono --full-aot mytestapp.exe Note that the command line option here is different from the previous command. One bit I don't fully remember is treatment of system libraries - I don't recall exactly but I think I had to precompile those as well, and maybe provide them alongside my own assembly. There is more information here: [http://www.mono-project.com/AOT][1] Last time I looked at this page was three years ago, and not a lot has changed, so it could be out-of-date documentation (e.g. more platforms may be supported now). [1]: http://www.mono-project.com/AOT

Viewing all articles
Browse latest Browse all 95

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>