Граф коммитов

390 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 1548594e7b [mtouch] Allow code sharing assemblies from multiple locations if they're identical. Fixes #56513. (#2119)
* [mtouch] Allow code sharing assemblies from multiple locations if they're identical. Fixes #56498.

We disallow code sharing when the same assembly (based on name) is referenced
from multiple paths, but poke a hole in this logic by allowing the same
assembly from multiple paths when those assemblies are 100% identical, since
that should be 100% safe.

https://bugzilla.xamarin.com/show_bug.cgi?id=56498

* [tests] Comment out assert that asserts due to another bug.
2017-05-25 07:10:56 +02:00
Rolf Bjarne Kvinge ea15ebd859 [mtouch] Don't look for assembly references in attributes in assemblies we ship. Partially fixes #49087. (#2121)
* [mtouch] Don't look for assembly references in attributes in assemblies we ship. Partially fixes #49087.

Don't look for assembly references in attributes in assemblies we ship,
because it takes a significant amount of time to do this, and we can
precompute the fact that there aren't any such assembly references.

Additionally add a test to ensure we catch any changes to this assumption.

For a simple test app this makes rebuilding (without any changes) go from
~1.1s to ~0.4s.

https://bugzilla.xamarin.com/show_bug.cgi?id=49087

* [tests] Simplify tests to not use [TestCaseSource].

Using [TestCaseSource] is nice when running from the IDE, since it shows all
test cases in the test tree.

Unfortunately it causes the console runner to freak out [1], because the method
that lists all the test cases calls Configuration's cctor, which calls
TestContext.CurrentContext.TestDirectory, which is apparently not safe this
early in the test run.

[1] I think 'freak out' is the appropriate term for this behavior, which has
absolutely no direct nor obvious connection to the cause of the problem:

System.Runtime.Remoting.RemotingException: Cannot create channel sink to connect to URL 93a78115_c0da_4b6a_9661_9f9b9d9fb935/6669afd6_4.rem. An appropriate channel has probably not been registered.

Server stack trace:
  at System.Runtime.Remoting.RemotingServices.GetClientChannelSinkChain (System.String url, System.Object channelData, System.String& objectUri) [0x00019] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.RemotingServices.GetOrCreateClientIdentity (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType, System.Object& clientProxy) [0x0001d] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.RemotingServices.GetRemoteObject (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType) [0x00000] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.RemotingServices.GetProxyForRemoteObject (System.Runtime.Remoting.ObjRef objref, System.Type classToProxy) [0x0001b] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef, System.Boolean fRefine) [0x0007a] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef) [0x00000] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.ObjRef.GetRealObject (System.Runtime.Serialization.StreamingContext context) [0x0000f] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.ObjectManager.ResolveObjectReference (System.Runtime.Serialization.ObjectHolder holder) [0x00010] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.ObjectManager.DoFixups () [0x0007f] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00077] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x000a2] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.DeserializeMethodResponse (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <04300341516a482b9708b764d58af7ca>:0
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg) [0x00083] in <270c90abbc234cde9d33eb198a97cf71>:0
2017-05-24 21:05:21 +02:00
Rolf Bjarne Kvinge 848dcddba3 [mtouch] Load assemblies correctly when loading cached list. (#2124)
Make sure to instantiate an Assembly instance for every assembly loaded using
the cached list of assemblies.

Fixes the following test failures:

1. Xamarin.MTouch.RebuildTest_WithExtensions("single","",False,System.String[]) :   second build
  Expected: 0
  But was:  1

2. Xamarin.MTouch.RebuildTest_WithExtensions("dual","armv7,arm64",False,System.String[]) :   second build
  Expected: 0
  But was:  1

3. Xamarin.MTouch.RebuildTest_WithExtensions("llvm","armv7+llvm",False,System.String[]) :   second build
  Expected: 0
  But was:  1

4. Xamarin.MTouch.RebuildTest_WithExtensions("debug","",True,System.String[]) :   second build
  Expected: 0
  But was:  1

5. Xamarin.MTouch.RebuildTest_WithExtensions("single-framework","",False,System.String[]) :   second build
  Expected: 0
  But was:  1
2017-05-24 21:03:32 +02:00
Rolf Bjarne Kvinge 009eba435b [mtouch] Cache the list of assemblies we computed. Partially fixes #49087. (#2120)
* [mtouch] Cache the list of assemblies we computed. Partially fixes #49087.

Computing the list of assemblies can be expensive, so cache it and re-use the
cached list if we can.

https://bugzilla.xamarin.com/show_bug.cgi?id=49087

* [mtouch] Create directory before trying to create files to it.
2017-05-24 07:26:36 +02:00
Rolf Bjarne Kvinge 4b8047977b [mtouch] Fix condition to detect a mix of dylibs and frameworks for the same library. Fixes #56679. (#2116)
https://bugzilla.xamarin.com/show_bug.cgi?id=56679
2017-05-22 19:11:34 +02:00
Rolf Bjarne Kvinge 0c87730ff1 [mtouch] Fix linking with the same third-party framework from both extension and container app. Fixes #56635. (#2112)
If both an extension and the container app (or multiple extensions) reference
the same binding assembly for a framework, then we'd error out with an
internal error when trying to copy the framework from both locations to the
container app.

So instead detect when we're trying to copy multiple identical (by comparing
the on-disk contents) frameworks, and only copy one of them.

We'll still show an error if the frameworks are different, but now a nice
MT1035 error with a proper error description instead of an internal error.

https://bugzilla.xamarin.com/show_bug.cgi?id=56635
2017-05-19 17:05:38 +02:00
Chris Hamons 562560d936 Fixup Xamarin.Mac Hybrid AOT and improve testing (#1995)
- Actually enable hybrid AOT by adding argument in right location
- Hybrid AOT and stripping does not play well currently with partial AOT
- Fix AOT makefile to work with nuget nunit
- https://bugzilla.xamarin.com/show_bug.cgi?id=55041
2017-05-16 13:29:08 -05:00
Rolf Bjarne Kvinge 47319eb878 [mtouch] Strip less when running in embeddinator mode. (#2085)
Passing -x (not remove global symbols) to strip seems to work fine.
2017-05-11 10:27:27 +02:00
Rolf Bjarne Kvinge d811ef4c39 [mtouch] Fix stripping of embeddinator frameworks. (#2075) 2017-05-10 10:10:49 +02:00
Rolf Bjarne Kvinge 35fc9f5764 [mtouch] Remove workaround for bug #55553 now that bug #55553 has been fixed. (#2063) 2017-05-04 08:38:57 -04:00
Rolf Bjarne Kvinge 363eb083ef [docs] Document mmp errors and remove duplicated information about mtouch errors. (#2056) 2017-05-01 14:02:54 -04:00
Rolf Bjarne Kvinge 1eb6c335a6 [mtouch] Disable incremental builds for the simulator. Fixes #55712. (#2054)
It does not make sense to support incremental builds for the simulator (since
no AOT compilation is done), it just makes the test matrix more complicated.

So simplify things by removing support for incremental builds.

We also ignore any (other) --assembly-build-target arguments, because building
to frameworks doesn't make sense either in the simulator.

https://bugzilla.xamarin.com/show_bug.cgi?id=55712
2017-04-28 13:34:37 -04:00
Rolf Bjarne Kvinge 80811d9efb [mtouch] Disable the workaround for bug #55553 when compiling for bitcode. (#2046)
The linker doesn't allow it when building for bitcode:

> 	ld: -ignore_optimization_hints and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
>	clang: error: linker command failed with exit code 1 (use -v to see invocation)

This fixes the Xamarin.MTouch.StripBitcodeFromFrameworks(tvOS,Marker) mtouch test.
2017-04-27 14:30:19 +02:00
Rolf Bjarne Kvinge f445856652 Merge pull request #2039 from rolfbjarne/e4k-static-registrar
Add support for the embeddinator in the static registrar.
2017-04-27 06:54:34 +02:00
Sebastien Pouliot 63a67b5287 Merge pull request #2040 from rolfbjarne/bug55555
[mtouch] Don't remove information when collecting all architectures. Fixes #55555.
2017-04-25 21:29:53 -04:00
Rolf Bjarne Kvinge 5c4d6a137a [mtouch] Work around bug #55553 by passing a magic flag to the native linker. 2017-04-25 18:55:06 +02:00
Rolf Bjarne Kvinge d8d9a96254 [mtouch] Add support for stripping bitcode from frameworks when not needed. Fixes #55256. (#2037)
This dramatically decreases the size of watchOS apps built for debug when
using frameworks, because it ends up removing all the bitcode from
Mono.framework.

https://bugzilla.xamarin.com/show_bug.cgi?id=55256
2017-04-25 17:46:41 +02:00
Rolf Bjarne Kvinge 294668fa54 [mtouch] Fix compiling assemblies to frameworks on watchOS. (#2038)
* [runtime] Fix Xamarin-debug.framework's install name.

This makes building to frameworks work in debug mode.

* [mtouch] Fix check to add frameworks to watchKit extensions.

* [mtouch] Never pass -read_only_relocs to the native linker when bitcode is enabled.

* [mtouch] Bitcode requires linking with c++.

This particular case applies to shared libraries/frameworks (we already link
with c++ when building statically).
2017-04-25 17:39:58 +02:00
Rolf Bjarne Kvinge 9cd3ab1206 [mtouch/mmp] Move --embeddinator to shared code so mmp gets it as well. 2017-04-25 16:06:41 +02:00
Rolf Bjarne Kvinge f6cbea8545 [mtouch] Don't remove information when collecting all architectures. Fixes #55555.
Of particular importance is if we're building for LLVM or not: this fixes a
bug where we wouldn't pass --llvm to the AOT compiler when compiling
assemblies to frameworks (which we do when sharing code).

https://bugzilla.xamarin.com/show_bug.cgi?id=55555
2017-04-25 14:32:08 +02:00
Rolf Bjarne Kvinge 6b89100044 Merge pull request #2019 from rolfbjarne/embeddinator-4000
Add embeddinator support.
2017-04-20 10:09:02 +02:00
Rolf Bjarne Kvinge 532fd7d2ee [mtouch] Fix launch mode. 2017-04-19 19:12:17 +02:00
Rolf Bjarne Kvinge 053955b47f [mtouch] Add roots to list of roots.
When collecting a list of roots, it helps adding any roots we find to the list
of roots.

This fixes the MT0023 mtouch tests, since now we actually report MT0023
because we have a list of the root assemblies.
2017-04-19 19:10:48 +02:00
Rolf Bjarne Kvinge 144ff1a6ba [mtouch] A few adjustments after allowing multiple root assemblies.
* Remove the MT0008 test, since the error will never be shown again.
* Check non-existent root assemblies and report MT0018 instead of MT0007 if
  they look like command-line arguments.
* Collect all MT0018/MT0007 errors before reporting any of them.
2017-04-19 19:08:59 +02:00
Rolf Bjarne Kvinge 6568ec70ed [mtouch] Install pdb files, not mdb files (which we're not creating anymore) (#2017) 2017-04-18 09:45:05 -04:00
Rolf Bjarne Kvinge 488cccb8d4 [mtouch] Put simulator assemblies into MonoBundle/simulator for frameworks.
Put simulator assemblies in MonoBundle/simulator for frameworks, so that we
can have a single framework that contains both device and simulator
assemblies without assemblies conflicting between device and simulator.

The device assemblies continue in the same place, in the MonoBundle directory,
so no additional checks are needed on device.
2017-04-18 15:18:46 +02:00
Rolf Bjarne Kvinge ba072d3168 [mtouch] Mark all public types in the root assemblies when in embeddinator mode.
Otherwise the linker might remove root assemblies, if they're libraries and
nothing at all is marked in them.
2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge 7134c46652 [mtouch] The main executable is a shared library when building for simulator in embeddinator mode. 2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge ef31d1fcd3 [mtouch] Generate assembly to framework mapping for the simulator when in embeddinator mode. 2017-04-18 11:36:30 +02:00
Rolf Bjarne Kvinge fceb49c4cd [mtouch] We need to create a fat simulator framework in embeddinator mode. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 5f1778298d [mtouch] Refactor lipo logic to a separate method. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 2b1e7af83d [mtouch] When in embeddinator mode, we still need to build the main executable for the simulator. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge 80536f9bd7 [mtouch] Simlauncher won't work for the embeddinator. 2017-04-18 11:36:29 +02:00
Rolf Bjarne Kvinge c43eedf781 [mtouch] Make sure the platform assembly is always included in the app when in embeddinator mode. 2017-04-18 11:36:28 +02:00
Rolf Bjarne Kvinge e44c1241ac [mtouch] When in embeddinator mode, we must link the generated registrar and pinvoke code into the framework we create.
When in embeddinator mode, we must link the generated registrar and pinvoke
code into the framework we create.

This also requires creating the corresponding aot/link tasks after creating
the registrar/pinvoke tasks.
2017-04-18 11:36:28 +02:00
Rolf Bjarne Kvinge 548ff02ed5 [mtouch] When in embeddinator mode the global gcc flags apply to the framework we create. 2017-04-18 11:36:28 +02:00
Rolf Bjarne Kvinge 08ba65ce67 [mtouch] Don't try to lipo the main executable in embeddinator mode.
Don't try to lipo the main executable in embeddinator mode, because there
isn't a main executable.
2017-04-18 11:36:28 +02:00
Rolf Bjarne Kvinge ca3fc72d38 [mtouch] When in embeddinator mode, create the NOTICE in the framework instead of the app. 2017-04-18 11:36:27 +02:00
Rolf Bjarne Kvinge 4c2419f993 [mtouch] When in embeddinator mode, libxamarin and libmono are linked statically into the target framework. 2017-04-18 11:36:27 +02:00
Rolf Bjarne Kvinge d1ebaa94db [mtouch] Add an embeddinator mode. 2017-04-18 11:36:27 +02:00
Rolf Bjarne Kvinge 392deaca30 [mtouch] Refactor NOTICE writing a little bit to make it possible to write NOTICE to any directory. 2017-04-18 11:36:27 +02:00
Rolf Bjarne Kvinge a3e066738c [mtouch] Set linker flags required by libmono when linking with libmono. 2017-04-18 11:36:26 +02:00
Rolf Bjarne Kvinge 1afae37c7f [runtime] Add support for initializing in an embedder mode. 2017-04-18 11:13:42 +02:00
Rolf Bjarne Kvinge 38960a5b9a [mtouch] Add support for multiple root assemblies from the command line. 2017-04-18 11:13:41 +02:00
Sebastien Pouliot d9fc5cf837 [mtouch] Update code that only considered .mdb (not .pdb) (#2003)
Also stop using `mdb` as the name for debug symbols and remove

> static MdbReader mdb_reader;

since we're not mkbundl'ing mtouch anymore.

Related to https://github.com/xamarin/xamarin-macios/pull/2002 for mmp
2017-04-17 12:48:35 +02:00
Marek Safar 594a375c02 Update tools to use csc 2017-04-14 09:11:01 +02:00
Rolf Bjarne Kvinge e61e5cce98 [mtouch] Make code sharing work on watchOS. (#1988)
* [mtouch] Only iOS has version 8 (and earlier OS versions that don't support frameworks).

* [mtouch] Update logging to be less confusing when logging about WatchKit extensions.

* [mtouch] Don't compile P/Invoke wrappers for extensions that are sharing code.

The container app already has the P/Invoke wrappers.
2017-04-11 19:20:22 +02:00
Rolf Bjarne Kvinge 651a9735ff Use Visual Studio instead of Xamarin Studio. (#1972)
* Use Visual Studio instead of Xamarin Studio.

* VS doesn't have mdtool, it has vstool.

Also there's no need to manually invoke the mdtool.exe executable anymore
(which we did because the mdtool executable had a min macOS version of 10.9,
and we used to build tests on older macOS versions [1]), since now we only run
tests on older macOS versions, we don't build those tests there.

[1] a1932b0ccd
2017-04-11 08:13:34 +02:00
Alex Soto 2a85ec1674 [mtouch] Remove workaround for bug 43462, this fixes slow builds (bug 52545) (#1976)
https://bugzilla.xamarin.com/show_bug.cgi?id=52545

Some projects took a lot of time to build with the workaround for
bug 43462 but now that it is fixed we can remove it and stop the slowness
2017-04-10 08:20:13 +02:00
Rolf Bjarne Kvinge 0a89324b16 [mtouch] Copy aot data to the app even for assemblies that aren't copied. Fixes #54499. (#1964)
We want to copy the aot data for both the 32-bit and the 64-bit versions of an
assembly even if the 32-bit and 64-bit versions of the assembly are identical.

https://bugzilla.xamarin.com/show_bug.cgi?id=54499
2017-04-06 14:29:38 +02:00
Chris Hamons d20ccf5bc6 [macos] Rework framework/weak_framework handling in mmp (#1953)
- Before this mmp was not adding -framework, -weak_framework consistently on non-static registrar use cases
- GatherFrameworks was previously not ported from mtouch, and did not work as DeploymentTarget was unset in mmp
- Added verbose prints so users can determine why various framework linkages are added
- Fixed an issue where duplicate were being added due to HandleFramework shoving args by hand
- Tested with auto test and https://github.com/chamons/xm-version-regression-test manual test
2017-04-05 14:38:40 -05:00
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
Sebastien Pouliot 8ffb553e9e [linker] Capture and show more information when a MT2001 error occurs (#1947) 2017-03-30 14:41:56 -05:00
Sebastien Pouliot 153056cf7f [mtouch] Provide a more accurate description of the MT0091 error (#1938)
The old one makes it sounds the linker is doing magic ;-)
2017-03-30 07:36:20 -05:00
Rolf Bjarne Kvinge 26aa29ebd0 Merge remote-tracking branch 'origin/master' into mono-2017-02 2017-03-24 18:09:24 +01:00
Marek Safar 105ee26509 Merge remote-tracking branch 'origin/master' into mono-2017-02 2017-03-23 23:13:43 +01:00
Rolf Bjarne Kvinge 563f395cac Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-23 15:33:38 +01:00
Vlad Brezae af02f7b31a Make sure we pass gc options if using concurrent sgen (#1867)
When using debug simulator we don't generate main.m so we were not passing the gc options.

The MONO_GC_PARAMS variable is not in app.EnvironmentVariables (which only contains environment variables passed to mtouch using --setenv), which is why the above condition does not trigger.
2017-03-15 16:59:08 -04:00
Rolf Bjarne Kvinge f27ad3d413 [mtouch] Fix bundling frameworks in WatchKit 1 extensions.
No frameworks should be bundled in WatchKit 1 extensions, they should be
bundled in the container (iOS) app.

This broke when merging the equivalent fix for master into the framework-sdk
branch (i.e. a broken merge).
2017-03-15 18:34:32 +01:00
Rolf Bjarne Kvinge 65ad42cce0 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-14 19:25:11 +01:00
Marek Safar 60bf37efad Wire up configuration to MonoTouchSweepStep 2017-03-14 11:51:08 +01:00
Marek Safar d0ea1589ee Updates mtouch.csproj 2017-03-14 11:51:08 +01:00
Marek Safar 258cbdda4b Adds pdb handling to mtouch 2017-03-14 11:51:08 +01:00
Marek Safar c51ba190f6 [mtouch] Copy pdb debug symbols when available 2017-03-14 11:47:06 +01:00
Marek Safar ddb377b7ff [build] Register linker for submodule checks 2017-03-14 11:47:06 +01:00
Marek Safar 1d3ad5e8c2 Bump mono and linker submodule 2017-03-14 11:47:06 +01:00
Rolf Bjarne Kvinge ff9bae7bbc [mtouch] Don't put frameworks in WatchKit 1 extensions. Fixes #53232. (#1864)
The frameworks go into the container app's Frameworks directory.

https://bugzilla.xamarin.com/show_bug.cgi?id=53232
2017-03-13 17:34:27 -05:00
Rolf Bjarne Kvinge 1e498bce22 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-07 07:38:30 +01:00
Rolf Bjarne Kvinge d196a78cda [registrar] Fix generic argument check to allow INativeObject. Fixes #52868. (#1788)
https://bugzilla.xamarin.com/show_bug.cgi?id=52868
2017-02-28 20:22:05 +01:00
Rolf Bjarne Kvinge 44cceb67bb [mtouch] Update error list. 2017-02-28 13:46:24 +01:00
Rolf Bjarne Kvinge 83d1111e10 [mtouch] Use fewer error numbers for code sharing failures. 2017-02-28 13:26:42 +01:00
Rolf Bjarne Kvinge 4de9a8c0d6 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-28 10:16:18 +01:00
Rolf Bjarne Kvinge ee5cc41c54 [mtouch] Disable fastdev for projects with more than one binding library. Works around bug #52727. (#1765)
https://bugzilla.xamarin.com/show_bug.cgi?id=52727
2017-02-24 13:34:47 -05:00
Rolf Bjarne Kvinge d212b97b1a Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-21 18:14:29 +01:00
Rolf Bjarne Kvinge cf14456cd5 [mtouch] Add docs and improve MT4146 to be an error if we can detect the generated code won't compile. Fixes #52530. (#1712)
https://bugzilla.xamarin.com/show_bug.cgi?id=52530
2017-02-17 16:00:53 +01:00
Rolf Bjarne Kvinge 6e90f92773 [mtouch] Rename a few variables to make them clearer. 2017-02-17 10:20:30 +01:00
Rolf Bjarne Kvinge 9518477412 [mtouch] Remove duplicated code. 2017-02-17 10:16:59 +01:00
Rolf Bjarne Kvinge 07127a76ca [mtouch] Make code sharing failures real warnings. 2017-02-17 10:16:51 +01:00
Rolf Bjarne Kvinge c1f87393ae Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-17 10:16:41 +01:00
Rolf Bjarne Kvinge 72ec3ad168 [mtouch/mmp] Add support for --nowarn and --warnaserror. (#1689)
Besides the obvious reasons, this is also useful when testing warnings, since
by making warnings errors, mtouch/mmp will exit a lot faster (and the tests
will finish faster).
2017-02-14 17:46:26 +01:00
Rolf Bjarne Kvinge 916a29accd [mtouch] Copy libprofiler-log.dylib to watch extensions.
Currently we don't put anything in the container watch app, which means we
need to put libprofiler-log.dylib in the watch extension itself.
2017-02-13 17:20:14 +01:00
Rolf Bjarne Kvinge 75c038fcd3 [mtouch] Disallow code sharing if bitcode options are different. 2017-02-13 15:51:10 +01:00
Rolf Bjarne Kvinge 816a62a64b [mtouch] A fat container app with a non-fat appex is allowed and not a problem. 2017-02-10 16:39:32 +01:00
Rolf Bjarne Kvinge fd8c09ecb8 [mtouch] Remove the Application.FastDev property, it's never set anymore. 2017-02-10 16:39:32 +01:00
Rolf Bjarne Kvinge 2eb2b7bd42 [mtouch] Remove fixed FIXME. 2017-02-10 16:39:27 +01:00
Rolf Bjarne Kvinge fd1e65d318 [mtouch] Validate a few assumptions about the linker output. 2017-02-10 16:39:27 +01:00
Rolf Bjarne Kvinge 8c4d56e898 [mtouch] Fix loading cached linked assemblies.
The cached linker results can have multiple identical input assemblies (for
assemblies that show up in both the app and any app extensions), so make sure
we don't load those more than once.
2017-02-10 16:39:26 +01:00
Rolf Bjarne Kvinge cd0c9c1163 [mtouch] Only files the linker copies when ensuring the linker output has up-to-date timestamps. 2017-02-10 16:39:26 +01:00
Rolf Bjarne Kvinge 10126f1839 [mtouch] Invalidated cached linked assemblies if a .config file changes.
Config files can modify the AOT-compiled code, so they must be taken into
account when doing cache validation for linked assemblies.
2017-02-10 16:39:26 +01:00
Rolf Bjarne Kvinge 8f91bb163e [mtouch] Re-AOT an assembly if its .mdb or .config files changed. 2017-02-10 16:39:25 +01:00
Rolf Bjarne Kvinge 6f4f54a790 [mtouch] Extensions don't need a NOTICE file, since it's already in the container app. 2017-02-10 16:39:25 +01:00
Rolf Bjarne Kvinge fb0749450c [mtouch] Make sure SDK assemblies in appex'es are included in the container app when code sharing. 2017-02-10 16:39:24 +01:00
Rolf Bjarne Kvinge c814e71fac [mtouch] Required symbols found by the linker must be filtered to the app we're building.
Since the linker can process multiple apps/appex'es at the same time, it also
means it will put together all the required symbols found in _all_ assemblies.

This means that we need to filter out required symbols for other
apps/appex'es.
2017-02-10 16:39:24 +01:00
Rolf Bjarne Kvinge d3e246b193 [mtouch] Don't do code sharing unless the container app's deployment target is at least 8.0.
Frameworks don't work on earlier iOS versions, so we can't (easily) share
native code in this scenario.
2017-02-10 16:39:24 +01:00
Rolf Bjarne Kvinge b1199d2b5a [mtouch] Remove dead code. 2017-02-10 16:39:23 +01:00
Rolf Bjarne Kvinge d0ea10de1a [mtouch] Build SDK assemblies by default to a framework whenever it makes sense.
Change the default to build SDK assemblies to a framework
(Xamarin.Sdk.framework) whenever an app has extensions.
2017-02-10 16:39:23 +01:00
Rolf Bjarne Kvinge 8a264c4602 [mtouch] Improve logging. 2017-02-10 16:39:23 +01:00
Rolf Bjarne Kvinge b547454e98 [mtouch] Fix cache invalidation with app extensions.
Change cache invalidation so that if any app extension's cache is invalid,
then invalidate the cache for the container app and all other app extensions.

This is the safest option when we're sharing code.
2017-02-10 16:39:23 +01:00
Rolf Bjarne Kvinge e7ae947189 [cache] Don't use the global command line arguments to determine input.
Don't use the global command line arguments to determine input, because that's
not the input we use for app extensions anymore.

Instead explicitly pass the input arguments when creating the cache.
2017-02-10 16:39:21 +01:00
Rolf Bjarne Kvinge 27289efb1a [mtouch] Fix bundling frameworks from extensions.
We must build each appex bundle before the container bundle, so that we can
compute the frameworks each appex the needs before bundling the container app.

Also there's no need to store the list of frameworks appex's need in a file,
since everything is now done in the same mtouch process.
2017-02-10 16:39:17 +01:00