xamarin-macios/builds
Rolf Bjarne Kvinge bbbe881747 Fix how we build frameworks. Fixes #53813. (#1952)
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
2017-04-03 11:52:29 +02:00
..
.gitignore [builds] Improve mono/llvm dependencies. (#1948) 2017-03-31 20:23:38 +02:00
Makefile Fix how we build frameworks. Fixes #53813. (#1952) 2017-04-03 11:52:29 +02:00
Mono.framework-Info.plist Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
Mono.framework-tvos.Info.plist Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
Mono.framework-watchos.Info.plist Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
create-shared-library.sh Fix how we build frameworks. Fixes #53813. (#1952) 2017-04-03 11:52:29 +02:00
mac-System.config Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
mono-wrapper.in Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
wrap-autogen.sh Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
wrap-configure.sh Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00