Understanding the compilation path

I'm trying to get a better understanding of exactly what happens when we compile a Xamarin.iOS app in Visual Studio Mac. I would appreciate any help in clarifying the process. Below is my somewhat fuzzy current understanding. Some (most) of this is probably incorrect.

1.) Visual Studio Mac uses the mono c-sharp compiler to compile project code into dlls/exe containing MSIL
2.) mtouch is then called to generate objective-c code from the dlls/exe
3.) mtouch either compiles the objective-c code to LLVM or, if necessary, uses the Xcode toolchain to call clang (e.g., if native c++ libraries are referenced) to handle the compilation instead
4.) Both of these produce and optimize LLVM?
5.) Mono's AOT compiler uses LLVM to produce a native binary for the target architechture, using ld to link various libraries (depending on linker configuration)
6.) mtouch takes the output of above and packages into project.app archive

I get that there are bindings to the native stuff somewhere to translate between c# and obj-c, but as you can probably tell I'm a bit confused about the actual process of getting from c# to .app.

Thanks,

Jordan

Sign In or Register to comment.