Mono AOT 参数

在多泛型及接口时使用Mono AOT需要使用如下编译 mscorlib.dll

mono --aot=full,nrgctx-trampolines=8096,nimt-trampolines=8096,ntrampolines=4048 mscorlib.dll


http://docs.xamarin.com/guides/ios/troubleshooting/


Ran out of trampolines of type 0

If you get this message while running device,  You can create more type 0 trampolines (type SPECIFIC) by modifying your project options "iPhone Build" section.  You want to add extra arguments for the Device build targets:

-aot "ntrampolines=2048"

The default number of trampolines is 1024.  Try increasing this number until you have enough for your application.


Ran out of trampolines of type 1

If you make heavy use of recursive generics, you may get this message on device.  You can create more type 1 trampolines (type RGCTX) by modifying your project options "iPhone Build" section.  You want to add extra arguments for the Device build targets:

-aot "nrgctx-trampolines=2048"

The default number of trampolines is 1024.  Try increasing this number until you have enough for your usage of generics.


Ran out of trampolines of type 2

If you make heavy use interfaces, you may get this message on device.  You can create more type 2 trampolines (type IMT Thunks) by modifying your project options "iPhone Build" section.  You want to add extra arguments for the Device build targets:

-aot "nimt-trampolines=512"

The default number of IMT Thunk trampolines is 128.  Try increasing this number until you have enough for your usage of interfaces.



Mono AOT 参数

编译流程

sudo apt-get install libmono2.0-cil mono-runtime
or
sudo apt-get install mono-complete

sudo mono --aot=full /usr/lib/mono/2.0/mscorlib.dll
sudo mono --aot=full /usr/lib/mono/2.0/...dll
mono --aot=full iBoxDB.net2.dll
mono --aot=full CA.exe
mono --full-aot CA.exe

你可能感兴趣的:(Mono AOT 参数)