bbbe881747
Previously we copied any equivalent .dylib and ran install_name_tool on the library to change the library id to make it a framework. Unfortunately this does not work when the library contains bitcode, because bitcode embeds linker flags (-install_name for instance), and install_name_tool does not change those linker flags. This means that we need to create frameworks by linking with the proper arguments, since it's much more difficult to fixup the embedded bitcode linker flags as well. So change how be build Mono.framework, Xamarin.framework, and any frameworks built from assemblies to: * Always link instead of fixup a dylib. For Mono.framework this means extracting all the object files from libmonosgen-2.0.a and linking those, for Xamarin.framework this means linking the object files we've already built. * Make sure the library is correctly named when linked (once again: bitcode contains embedded linker flags, so renaming the executable later breaks stuff as well). I've also extracted the logic that creates Mono.framework from libmonosgen-2.0.a to a separate shell script, to deduplicate this logic. This required a minor change in the mono builds: we need the Mono.framework when building the `all` target, so make sure that happens. https://bugzilla.xamarin.com/show_bug.cgi?id=53813 |
||
---|---|---|
.. | ||
xamarin | ||
.gitignore | ||
COOP.md | ||
Delegates.cs.t4 | ||
EXCEPTIONS.md | ||
Makefile | ||
README.md | ||
Xamarin.framework-ios.Info.plist | ||
Xamarin.framework-tvos.Info.plist | ||
Xamarin.framework-watchos.Info.plist | ||
bindings-generator.cs | ||
bindings-generator.csproj | ||
bindings.h | ||
bindings.m | ||
delegates.h.t4 | ||
delegates.inc.t4 | ||
delegates.t4 | ||
exports.t4 | ||
extension-main.m | ||
launcher.h | ||
launcher.m | ||
libmonotouch.csproj | ||
libxammac.csproj | ||
main-internal.h | ||
mono-runtime.h.t4 | ||
mono-runtime.m.t4 | ||
monotouch-debug.h | ||
monotouch-debug.m | ||
monotouch-main.m | ||
monotouch-support.h | ||
nsstring-localization.m | ||
product.h | ||
runtime-internal.h | ||
runtime.m | ||
shared.h | ||
shared.m | ||
slinked-list.h | ||
trampolines-i386-asm.s | ||
trampolines-i386-objc_msgSend-copyframe.inc | ||
trampolines-i386-objc_msgSend-post.inc | ||
trampolines-i386-objc_msgSend-pre.inc | ||
trampolines-i386-objc_msgSend.s | ||
trampolines-i386-objc_msgSendSuper.s | ||
trampolines-i386-objc_msgSendSuper_stret.s | ||
trampolines-i386-objc_msgSend_stret.s | ||
trampolines-i386.h | ||
trampolines-i386.m | ||
trampolines-internal.h | ||
trampolines-invoke.m | ||
trampolines-varargs.h | ||
trampolines-varargs.m | ||
trampolines-x86_64-asm.s | ||
trampolines-x86_64-objc_msgSend-copyframe.inc | ||
trampolines-x86_64-objc_msgSend-post.inc | ||
trampolines-x86_64-objc_msgSend-pre.inc | ||
trampolines-x86_64-objc_msgSend.s | ||
trampolines-x86_64-objc_msgSendSuper.s | ||
trampolines-x86_64-objc_msgSendSuper_stret.s | ||
trampolines-x86_64-objc_msgSend_stret.s | ||
trampolines-x86_64.h | ||
trampolines-x86_64.m | ||
trampolines.m | ||
xamarin-support.m |
README.md
Native runtime
This directory contains the native runtime for Xamarin.iOS and Xamarin.Mac.
Cooperative GC
See COOP.md
Generated code
A few files are generated automatically:
delegates.h|inc, Delegates.cs
These files contain the code required to glue the native runtime and the managed runtime.
mono-runtime.m, xamarin/mono-runtime.h
These files contain code that makes other code, consumers of the mono runtime, oblivious to whether the mono runtime is linked statically, dynamically, or using dlopen at runtime.
If you need to use a new function from the Mono headers, add it to exports.t4.
If you need a new enum / constant / typedef / etc, add it to mono-runtime.h.t4.
Shipped headers
These are the headers shipped with XI/XM (they're not for public consumption, but we need them to build generated code on customers machine, in particular main.m and registrar.m)
xamarin/runtime.h xamarin/trampolines.h xamarin/main.h xamarin/xamarin.h