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

485 Коммитов

Автор SHA1 Сообщение Дата
Chris Hamons ffe142d0b5 [XM] AOT support in Xamarin.Mac (#1340) 2017-01-11 14:10:39 -06:00
Rolf Bjarne Kvinge c2e2e3d824 [mtouch] Include extracted frameworks from binding assemblies when listing the frameworks an extension needs. Fixes #45800. (#1461)
Include extracted frameworks from binding assemblies when listing the
frameworks an extension needs.

Fixes #45800 - comments 8-13.

https://bugzilla.xamarin.com/show_bug.cgi?id=45800
2017-01-11 16:50:07 +01:00
Vincent Dondain ded6d2f129 [mtouch] Update MT0091 message (#1453)
Fixes bug #40835: Improve enable managed linker error message
(https://bugzilla.xamarin.com/show_bug.cgi?id=40835)
2017-01-09 16:34:58 +01:00
Rolf Bjarne Kvinge b3d2b50dca [mtouch] Auto-install locally after building in the IDE. (#1432)
Auto-install locally after building in the IDE, so that running mtouch tests
after running the mtouch project doesn't require switching to the command
line.
2017-01-03 16:34:33 -05:00
Sebastien Pouliot dea2dde259 [linker] Update mscorlib.xml to preserve generic collection interfaces. Fixes #50290 (#1384) (#1427)
The `generic_icollection_class` condition (in class.c) does not match the mscorlib.xml descriptor file.

+ IEnumerator`1
+ IReadOnlyList`1
+ IReadOnlyCollection`1

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=50290
2017-01-03 13:03:29 -05:00
Rolf Bjarne Kvinge d7ecfc3a14 [mtouch/mmp] Make Cache a non-static class. (#1425)
So that there can be multiple caches in the same process (which we'll have
once mtouch can compile extensions and the container app in the same process).
2017-01-03 15:14:47 +01:00
Rolf Bjarne Kvinge 3d4ad53253 [mtouch] Fix infinite recursion after d1102c80. (#1420)
Fixes this test failure:

    Xamarin.Registrar.MT4161 : Unexpected error/warning with --registrar:static:
	    error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
2017-01-02 11:05:01 +01:00
Rolf Bjarne Kvinge ab21da1b85 [xharness] Add support for uninstalling apps from device. (#1413)
The new error message / number is used in mlaunch.
2017-01-02 08:58:46 +01:00
Chris Hamons cdf3915704 Fix EveryFrameworkSmokeTests test with MediaPlayerLibrary (#1418) 2016-12-28 08:46:46 -06:00
Rolf Bjarne Kvinge ab2548a115 [mtouch] Automatically create the output directory if it doesn't exist. (#1414) 2016-12-24 10:57:08 -05:00
Sebastien Pouliot a562ac513a [apidiff] Update XML references to match C8SR2 (10.3.1) (#1411) 2016-12-23 13:13:24 -05:00
Rolf Bjarne Kvinge d1102c800e [mtouch] Remove most static state and put it on an instance. (#1398)
* [mtouch] Remove most static state and put it on an instance.

Remove most static state, and put it on an instance (of Application) instead.

Soon we'll build multiple apps (app extensions) in the same process, and we
need to make sure we're not inadvertedly (and incorrectly) sharing state
between apps, so remove as much static state as possible to avoid any
problems.

* [mtouch] Rename GetIsUsingClang -> IsUsingClang.
2016-12-23 18:50:35 +01:00
Rolf Bjarne Kvinge 3ec3f39089 [mtouch] Always require a SDK version when building. (#1407)
* [mtouch] Always require a SDK version when building.

Technically it was required before too, but the error messages were non-optimal:
it could for instance complain that the user is using an iOS framework that
was introduced in iOS 2.0.

* [mtouch tests] Rewrite MT0060 and MT0061 tests to use MTouchTool.

This makes sure we pass --sdk to mtouch (which MTouchTool does by default), so
that we don't run into MT0025 before the errors we're testing for.
2016-12-23 17:09:39 +01:00
Rolf Bjarne Kvinge ee5b450174 [mtouch] Remove deprecated comment. (#1402) 2016-12-23 07:35:36 +01:00
Rolf Bjarne Kvinge 3f9599d3f4 [mtouch/mmp] Add better help for the --marshal-[managed|objectivec]-exceptions arguments. (#1403) 2016-12-22 20:11:50 +01:00
Rolf Bjarne Kvinge db4c28df61 [mtouch] Remove Classic-only file. (#1400) 2016-12-22 18:53:22 +01:00
Rolf Bjarne Kvinge 7dad48a59c [mtouch] Remove dead code. (#1397)
The (ugly) manual exit logic was only needed when interacting with the
simulator, which mtouch doesn't do anymore.
2016-12-22 17:39:10 +01:00
Rolf Bjarne Kvinge ffe3184345 [generator] Use --target-framework to specify which XM profile to target. (#1339) 2016-12-20 11:33:56 +01:00
Chris Hamons 378827c6ee Remove unnecessary allocations of Version in Static Registrar (#1371) 2016-12-16 15:59:12 -06:00
Chris Hamons 10bb6b1f1b [XM] Fix isysroot with new fixed SDKVersion 2016-12-13 15:12:50 -06:00
Chris Hamons 5a6c205739 Fix d02c112176 to work when no sdk passed in 2016-12-13 13:47:24 -06:00
Chris Hamons d02c112176 [XM] Fix static registrar to handle frameworks added in point releases
- Move hack from StaticRegistrar to mmp driver so we set SDKVersion correctly for point releases
- Clean up a bit of duplicate while we are there
2016-12-13 12:20:47 -06:00
Chris Hamons 5cb1b1eee8 [XM] Fix static registrar with Xcode 8.2
- Another brick in the wall of GetSDKVersion hacks
2016-12-13 08:44:54 -06:00
Sebastien Pouliot b5632f9c2f merge xcode8.2 into master 2016-12-12 21:26:23 -05:00
Rolf Bjarne Kvinge 318a7dfbe1 TargetFramework: add support for profile. (#1337)
Add support for specifying the profile with the target framework,
and support using "Version=" before the version:

    Xamarin.Mac,Version=v2.0,Profile=Mobile.
2016-12-12 17:01:10 +01:00
Rolf Bjarne Kvinge 6f42a71d4b [mtouch] Don't quote paths until they're passed to external commands. Fixes #49255. (#1334)
https://bugzilla.xamarin.com/show_bug.cgi?id=49255
2016-12-12 14:03:45 +01:00
Vincent Dondain 887a410fe2 [msbuild] Add error codes for PropertyListEditorTaskBase (#1325)
* [msbuild] Add error codes for PropertyListEditorTaskBase

* [msbuild] Add task names in all errors' descriptions
2016-12-12 10:30:42 +01:00
Rolf Bjarne Kvinge 0b6e73581f TargetFramework: be case-insensitive for the identifier when computing the hash code. (#1323)
Be case-insensitive for the identifier when computing the hash code,
since we compare the identifier case-insensitively in Equals.
2016-12-09 09:16:26 -05:00
Rolf Bjarne Kvinge 7842a0b506 [mtouch] Remove deprecated Classic commmand-line arguments. (#1319)
* [mtouch] Remove deprecated Classic commmand-line arguments.

* [mtouch docs] Document MT0022's death.
2016-12-08 18:59:04 +01:00
Vincent Dondain 901b94d6e1 Merge pull request #1237 from VincentDondain/msbuild-mt-errors
[msbuild] Add msbuild error code logic
2016-12-08 12:50:58 -05:00
Rolf Bjarne Kvinge d99212a712 Pass StringComparison to string.StartsWith / EndsWith. (#1316) 2016-12-08 16:54:10 +01:00
Rolf Bjarne Kvinge 30bac18e10 [mtouch] Fix BundleId. (#1315)
The BundleId property is used by the code that generates the mSYM directory,
but its value was always the default value 'com.yourcompany.sample' instead of
looked up in the app's Info.plist.

So fix the BundleId property to do the expected.

Also fix the mSYM test (SymbolicationData) to actually test mSYM stuff (it was
partially disabled when we disabled automatic mSYM generation for C8, and
never re-enabled), and port it to the new and better test syntax, and add a
few more asserts to check the manifest.xml generation.
2016-12-08 16:05:47 +01:00
Rolf Bjarne Kvinge 8de0d43799 [mtouch] -lsqlite3 is a linker flag, not a file to be linked with, so treat it accordingly. Fixes #49220. (#1313)
-lsqlite3 is a linker flag, not a file to be linked with, so when
automatically determining that we need to pass -lsqlite3 we need to put it in
the right list of linker information.

Otherwise we may end up passing `-force_load -lsqlite3` to the linker (if the
assembly's ForceLoad flag is set), which won't compile.

https://bugzilla.xamarin.com/show_bug.cgi?id=49220
2016-12-08 15:42:30 +01:00
Chris Hamons 1c7429e864 [XM] Add disable switch to partial static registrar in mmp (#1303)
- Rework with state now RegistrarMode.PartialStatic
- Don't default RegistrarMode.PartialStatic if system mono (fixes mmp regression test on wrench)
2016-12-05 14:16:03 -06:00
Rolf Bjarne Kvinge 8dc6b88bbf [mtouch] Only check for iOS min deployment target when building for iOS. (#1302) 2016-12-05 18:34:41 +01:00
Rolf Bjarne Kvinge 33b677b763 [mtouch] Exec the binary in the script. (#1295)
This way the mtouch process is killed if the parent process kills the process
it spawned.
2016-12-02 17:41:38 +01:00
Chris Hamons c67bd9096c [XM] Add partial static registrar support (#1191) 2016-12-01 10:18:30 -06:00
Chris Hamons cc99d21ff6 [XM] Change mmp defaults to static registrar and disable lldb attach … (#1256)
* [XM] Change mmp defaults to static registrar and disable lldb attach in release mode

- Static registrar is now proven and can be flipped on for default on release
- LLDB attach isn't very helpful in release mode and pops up the install xcode dialog
- Relax Unified_HelloWorld_ShouldHaveNoWarnings to exclude static registrar warnings due to https://bugzilla.xamarin.com/show_bug.cgi?id=48311
2016-11-29 12:44:05 -06:00
Chris Hamons 24e041068f Merge pull request #1232 from xamarin/xm_mmp_native_lib_crash
[XM] Fix crash in mmp when native reference path matches dllimport found
2016-11-28 08:54:30 -06:00
Vincent Dondain 8ea1509dec [msbuild] Add msbuild error code logic
- `LoggingExtensions` has a new `MTError` extension method that helps generate
  an msbuild error with the proper MTxxx format.
- Added error codes for 44 msbuild errors.
- Updated `docs/website/mtouch-errors.md` and `tools/mtouch/error.cs` accordingly.
- MT7001 contains some extra documentation (troubleshooting steps).
2016-11-24 15:24:30 +01:00
Chris Hamons ce464cacc3 [XM] Fix crash in mmp when native reference path matches dllimport found
- When native_libs.Add (nr, null) was hit above and then we later matched
 we would call methods.AddRange (kvp.Value) on an empty methods
2016-11-23 14:00:01 -06:00
Zoltan Varga 4c8898f3ee [mtouch] Convert .file directives containing backslashes correctly. Fixes #44733. (#1211) 2016-11-18 07:02:41 +01:00
Chris Hamons 441ae8c4ec Merge pull request #1178 from xamarin/xm_fix_touchbar_mess
Re-add touchbar APIs to master, this time with the correct StaticRegistar fix...
2016-11-14 10:59:51 -06:00
Rolf Bjarne Kvinge 9979cb1b82 [mtouch] Don't copy mdb files if they haven't changed. (#1182)
This fixes an mtouch test:

```
1) Failed : Xamarin.MTouch.RebuildTest("debug","-sdkroot {2} -v -v -v -v --dev {0} -sdk {3} --targetver 6.0 {1} -r:{4} --cache={5}/cache --debug")
  debug-rebuilt
/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp3fef2cc4.tmp/testApp.app/.monotouch-32/System.dll.mdb is modified, timestamp: 11/12/2016 1:17:59 AM
/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp3fef2cc4.tmp/testApp.app/.monotouch-32/Xamarin.iOS.dll.mdb is modified, timestamp: 11/12/2016 1:17:59 AM
/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp3fef2cc4.tmp/testApp.app/.monotouch-32/mscorlib.dll.mdb is modified, timestamp: 11/12/2016 1:17:59 AM
```
2016-11-14 14:50:08 +01:00
Rolf Bjarne Kvinge 1f8149ad44 [mtouch] Fix typo in PreBuild directory name. 2016-11-14 13:34:56 +01:00
Chris Hamons cc9a99f996 [XM] 10.12.1 APIs are in Xcode 8.1 not 8.2 2016-11-11 14:02:55 -06:00
Chris Hamons 6422000c27 [XM] Fix static registrar under Xcode 8.2 with another hack (#1164)
- Generalized the hack a bit. If we continue to need them
we can make it more data driven
2016-11-11 13:19:26 -06:00
Rolf Bjarne Kvinge 7c6d04f1c5 [mtouch] Simplify code a bit by reusing existing logic. (#1148) 2016-11-09 12:49:19 -05:00
Rolf Bjarne Kvinge e563d96083 [mtouch] Fix parsing --mono argument. (#1145) 2016-11-09 16:16:00 +01:00
Sebastien Pouliot eec681a711 [mtouch] Bring back PreBuildDirectory (#1142)
* [mtouch] Bring back PreBuildDirectory

Some mtouch unit tests failed because of timestamp checks. It's not clear
it's always a win (it's not in my original test case) not to copy (to
target) as it means we have to copy earlier (PreBuild + Build).

More investigation needed, there's probably a better way to achieve both.
In the mean time this should fix the failing tests cases.

* Fix up / simplify logic and avoid duplicate calls to IsUpdate
2016-11-09 12:05:59 +01:00
Sebastien Pouliot c92934eb6d [mtouch][mmp] Only allow `appletls` for the TLS provider (#1132)
The old `legacy` option will now be reported as a warning. 

That's by design an warning would require manually editing the .csproj
file (when the UI gets removed, as planned, from the IDE). 

This is part of
https://trello.com/c/SrgU38DN/647-only-ship-support-appletls

Note: The BCL changes will happen in later stages.
2016-11-08 14:42:40 -05:00
Rolf Bjarne Kvinge d42a9f4909 [mtouch] Make MT2015 (invalid HttpMessageHandler) a warning for known http message handlers on watchOS. Fixes #46552. (#1134)
Earlier versions of Xamarin Studio stored an invalid http message handler in
watchOS project files, which would cause a build error. In addition Xamarin
Studio removed the UI to set the http message handler (since only one value is
valid), which meant that the user had to edit the project file by hand to get
around this build error.

So make it a warning instead (and document what the user has to do to fix the
warning).

https://bugzilla.xamarin.com/show_bug.cgi?id=46552
2016-11-08 11:13:53 -05:00
Rolf Bjarne Kvinge a2a67377df [mtouch] Update the timestamp for the simlauncher when copying it into the app. (#1094)
This makes sure that the final executable has a timestamp after the .exe,
which makes the MSBuild tasks able to avoid unnecessary rebuilds.
2016-11-03 14:35:46 +01:00
Rolf Bjarne Kvinge 7728c4cd19 [registrar] Use metadata tokens instead of strings to find types and methods. (#1085)
Use metadata tokens instead of strings to find types and methods.

This makes the code to find methods more compact (a lot less strings in the
executable, and additionally in most cases a compact representation (32-bit
integer) of the corresponding metadata token and additional information can be
used, which results in less executable code (fewer parameters to methods,
etc)), resulting in smaller executables.

Size savings are around 200kb for dont link apps, and 20-60kb for linked apps
(this obviously varies a lot depending on how much has to registered by the
registrar).

|                |    Before     |     After     |       Diff        |
|----------------|--------------:|--------------:|------------------:|
| dontlink/32bit |  102.810.144  |  102.609.456  | -200.688 = -0,20% |
| dontlink/64bit |  107.420.576  |  107.221.792  | -198.784 = -0,19% |
| linksdk/32bit  |   40.957.296  |   40.936.864  |  -20.432 = -0,05% |
| linksdk/64bit  |   43.113.136  |   43.093.936  |  -19.200 = -0,04% |
| linkall/32bit  |   38.410.032  |   38.348.288  |  -61.744 = -0,16% |
| linkall/64bit  |   40.315.200  |   40.267.344  |  -47.856 = -0,12% |

Additionally I've removed the `lazy_map` dictionary, which we populated at
startup and was used to map between Class instances and the corresponding
managed type's FullName, and instead iterate over a native array of Class ->
metadata token mappings whenever we need to look up the managed type for a
certain Class instance.

This is slightly slower for each type we need to look up (for a non-linked app
there might be a 2000-3000 entries in the native array, which would be
iterated instead of using a hashtable lookup), but it's only done once per
type and there's a significant startup memory improvement.

For a non-linked test app I get the following using the Xamarin profiler:

|                   |  Before |  After  |       Diff      |
|-------------------|--------:|--------:|----------------:|
| Memory allocated  |  2,8 MB |  2,4 MB | -0,4 MB = -14 % |
| Objects allocated |   43678 |   38463 |   -5215 = -12 % |
| Private bytes     | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
| Working set       | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
2016-11-01 14:34:56 -04:00
Sebastien Pouliot 7b38187479 [mtouch][mmp] Unify user resources removal as a link step (#1026)
Right now the logic exists in a few places, both in and outside the
linker. We recently began to use part of the linker pipeline in normal /
all builds so it's easier to share (and unify) the code now.

The real gain is to avoid copying assemblies, in particular large ones,
more than strictly needed while building.

E.g. a build including a very large 1.3GB assembly, with several
native libraries embedded, save a lot of time avoiding the rewrites

mtouch (before)
		Total time: 64202 ms

mtouch (after)
		Total time: 34840 ms

* Add XM support for RemoveUserResourcesSubStep

* Tests supplied by @chamons
2016-11-01 13:11:25 -04:00
Rolf Bjarne Kvinge ac98469ddd [mtouch] Run the partial static registrar separately for 32-bit and 64-bit. (#1078)
Run the partial static registrar separately for 32-bit and 64-bit, since this
is required with the upcoming changes to embed metadata tokens inside the
generated output, because the metadata tokens are different between the 32-bit
and 64-bit versions of Xamarin.iOS.dll.

Also make sure to properly resolve the 32-bit and 64-bit assemblies correctly
(by setting the ArchDirectory on the assembly resolver), so that we don't pick
up the reference assembly (which does not have the right metadata tokens).

Additionally stop running the partial static registrar for MonoTouch.Dialog-1,
since with the upcoming changes to use metadata tokens in the generated
output, we won't support registering anything more than once. This shouldn't
make much of an impact, because MonoTouch.Dialog-1 is fairly small, and
doesn't take long to register in the dynamic registrar. For device builds (or
when the static registrar is selected) this has no effect, since in that case
we're registering everythinga anyway.
2016-11-01 16:41:41 +01:00
Rolf Bjarne Kvinge 3e19d604a1 [mtouch] Link the executable with LinkWith attributes' libraries in the simulator when doing incremental builds. (#1080)
Link the executable with LinkWith attributes' libraries in the simulator when
doing incremental builds, since we don't create dylibs there.

Fixes several mtouch test failures:

1) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_LinkAll(Unified)
2) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_LinkAll(TVOS)
3) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_LinkSDK(Unified)
4) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_LinkSDK(TVOS)
5) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_NoLink(Unified)
6) Test Failure : Xamarin.MTouch.FastDev_NoFastSim_NoLink(TVOS)
7) Test Failure : Xamarin.MTouch.FastDev_Sim(Unified)
8) Test Failure : Xamarin.MTouch.FastDev_Sim(TVOS)
2016-11-01 16:31:10 +01:00
Rolf Bjarne Kvinge 23b693c5ff [mtouch] Update mdb files even if the corresponding assembly didn't change. Fixes #39535. (#1072)
Update mdb files even if the corresponding assembly didn't change, because the
mdb can change even if the assembly didn't (if whitespace was modified in the
source code, causing code lines to move).

https://bugzilla.xamarin.com/show_bug.cgi?id=39535
2016-11-01 15:37:37 +01:00
Sebastien Pouliot 11390f119c [mtouch] Don't set Force when the cache is invalid (as it will be deleted) (#1016)
If the cache is invalid we print a warning:

> A full rebuild will be performed because the cache is either incomplete or entirely missing.

and set `Driver.Force = true;` (in Application.cs).

This later means that extracting the native code is done on each target:

```
		public static bool IsUptodate (string source, string target)
		{
			if (Driver.Force)
				return false;
```

even if this is identical between 32 and 64 bits (targets). That's
inefficient and, for large binding libraries (e.g. > 1GB), has a
noticable impact on build time (see timestamps).

Considering that the cache is cleaned (when detected as invalid) then
this Force condition is not really needed.

E.g. in `IsUptodate`
* the first time (arch) it's called will have to extract the native library;
* if a 2nd arch is built (fat) then it will be found as present and will
  not be extracted again

Removing the `Driver.Force = true;` in this condition let the `-f` option
continue to extract it twice, which can be useful in debugging and testing.
As such the check is not removed from `IsUptodate`

Timestamps (before)

		Setup: 25 ms
		Resolve References: 1605 ms
		Extracted native link info: 10465 ms
		...

Timestamps (after)
		Setup: 24 ms
		Resolve References: 1560 ms
		Extracted native link info: 5473 ms
		...

Total build times (from XS) was around 90-100 seconds so 5 seconds is
about 10%. The actual savings will depend on how much native code needs
to be extracted, but it should help most release builds (almost always
fat builds).
2016-11-01 09:10:09 -04:00
Sebastien Pouliot 4bb5c6d255 [mtouch] Remove incorrect comment and extraneous call to LoadSymbols (#1013)
* Comment is wrong: the code is never executed in parallel

* If reached then RemoveResources will be called and already check for
  symbols (and load them when needed). Just a simplification (it won't
  really save time as it's not loaded twice)
2016-11-01 09:09:27 -04:00
Sebastien Pouliot 4a2648e38f [mtouch] Remove the code to reset the resolver as it does nothing (#1012)
IIRC this used to be needed with a (rather old) version of Cecil.
The current code does nothing as the Load will only hit the cache
and not other properties are changed (compared to the old commented
code)
2016-10-31 22:31:22 -04:00
Sebastien Pouliot f015a954ec [mtouch] Add missing HasParameters check inside linker and static registrar (#1010)
* [mtouch] Add missing HasParameters check inside linker and static registrar

Without the checks new, empty collections can be allocated and their
whole and only purpose will be to iterate up to 0 (nop).

The checks saves a small amount of memory (collections) and time.

* [registrar] Fix method comparison when they have no parameters
2016-10-31 22:31:07 -04:00
Sebastien Pouliot eb34a6a74f [mtouch] Reduce the number of file lookups inside AssemblyResolver (#1009)
The SDK does not ship any, non-tool, .exe files. In fact .exe _should_
never need to be resolved since the main .exe is always given as an input
to mtouch.

Still it's possible (if quite uncommon) to refer to other .exe assemblies
just like if they were .dll. However those can only come from the
RootDirectory (and not the other places that ship with the SDK).

This "fix" ensure lookups for *.exe is done only inside the RootDirectory
location, speeding up (a bit) resolving assemblies.
2016-10-31 22:30:32 -04:00
Rolf Bjarne Kvinge c521bfde62 [mtouch] Don't link native libraries into the main executable if we're doing an incremental build. Fixes #42473. (#1073)
Native libraries are already linked into the dylib for the binding assembly,
which means that if we also link it into the main executable, the native code
ends up twice in the app (which is bad for many reasons).

https://bugzilla.xamarin.com/show_bug.cgi?id=42473
2016-10-31 16:55:45 -04:00
Rolf Bjarne Kvinge 1c81c8a5a8 [mtouch] Improve logging a bit. (#1071)
* Show log statements from assembly comparison.
2016-10-31 16:53:02 -04:00
Rolf Bjarne Kvinge e8789f2af6 [mtouch] Copy frameworks referenced by watch extensions to the bundle. (#1070)
Watch extensions do not have access to the containing app bundle on the phone,
so instead copy frameworks to the extension itself.
2016-10-31 17:02:37 +01:00
Rolf Bjarne Kvinge 0b3ab9cc15 [mtouch] Copy third-party frameworks from extensions to the main app's Frameworks directory. Fixes #45800. (#1069)
The container app may not reference the same third-party frameworks as
extensions, which means that we must make sure the extension's frameworks are
also included in the app bundle.

So when building extensions save a list of all third-party frameworks, and
then read that list and include those frameworks when building the main app.

https://bugzilla.xamarin.com/show_bug.cgi?id=45800
2016-10-31 12:36:06 +01:00
Rolf Bjarne Kvinge 0c43ddc615 Disable managed exception marshaling when the debugger is attached. Fixes #45116. (#1055)
Managed exception marshaling interferes with the debugger, because it adds
exception handlers to executing code, which makes the Mono runtime think an
exception is handled when logically it's not (although technically it is).

The consequence is that the IDEs will only be notified when we re-throw the
exception after catching it, making it impossible for the IDEs to stop when
the exception is thrown (they will instead stop when we re-throw the
exception).

So disable managed exception marshaling (unless the user changed the default
behavior) when a debugger is attached.

This is the same behavior as Xamarin.Android.

https://bugzilla.xamarin.com/show_bug.cgi?id=45116
2016-10-28 19:07:01 +02:00
Rolf Bjarne Kvinge 4371ea4540 [static registrar] Fix registration of generic types. Fixes #44926. (#1063)
https://bugzilla.xamarin.com/show_bug.cgi?id=44926
2016-10-28 18:42:45 +02:00
Rolf Bjarne Kvinge dde242c32a Allow using LinkWith attribute without a native library. (#997)
This makes it possible to set linker flags per assembly:

    [assembly: LinkWith (LinkerFlags = "-lsqlite3")]

Which is required when incremental builds is enabled and a particular assembly
needs special linker flags (because we don't propagate the global -gcc_flags
to each dylib we build when doing incremental builds).

Also add an option to set the dlsym mode for an assembly (using the LinkWith
attribute).
2016-10-28 10:50:42 -04:00
Rolf Bjarne Kvinge 6104a514fc [registrar] Cache the System.Void type. (#1024)
Duration before: 1,60s
Duration after:  1,54s
Difference:     -0,06s = -3,8%

Memory usage hardly changed (-21 kb of 540 MB), but the number of method calls
shrunk significantly.

Method calls before: 86.720.379
Method calls after:  74.390.061
Difference:         -12.330.318 = -14,2%

The call to `GetSystemVoidType` was #2 on the list of method calls (whens
sorted by 'self'), called 1072 times taking 1429 ms each time. After this
change it's only called once (and obviously pushed way down the list).
2016-10-28 09:52:58 -04:00
Rolf Bjarne Kvinge ea1a08785d [mtouch] Verify the correct SDK version when referencing frameworks from watchOS projects. (#1058) 2016-10-28 09:16:35 -04:00
Rolf Bjarne Kvinge a1644f6e13 [registrar] Improve an error message. (#1047) 2016-10-28 08:38:38 -04:00
Rolf Bjarne Kvinge 23a0186a99 [registrar] Fix compiler warning. (#1054) 2016-10-28 08:33:18 -04:00
Chris Hamons b5edf16711 [XM] Teach XM resolver to load all of assemblies into memory (#1034)
- Profiling suggesting that loading all of sub-100 MB assemblies into
 memory is a performance win, and mtouch already does it.
2016-10-28 08:28:43 -04:00
Rolf Bjarne Kvinge c6d7a3adec [linker] Use ordinal instead of invariant comparison. (#1025)
Profiled when running the partial static registrar on Xamarin.iOS.dll

Duration before: 1,60s
Duration after:  1,41s
Difference:     -0,19s = -11,9%

Memory usage before: 541.887.736 bytes
Memory usage after:  509.111.944 bytes
Difference:          -32.775.792 bytes = -6,0%

Method calls before: 86.720.379
Method calls after:  63.073.602
Difference:         -23.646.777 = -27,3%
2016-10-28 08:28:02 -04:00
Sebastien Pouliot 81c94cd683 Update XML definition for XM C8SR1 (from cycle8 branch) 2016-10-27 18:37:25 -04:00
Sebastien Pouliot 405bf0e979 [mtouch] Fix MT1009 to report the inner exception (#1008)
Found out it was missing by breaking (locally) something else :)
2016-10-27 17:45:33 -04:00
Rolf Bjarne Kvinge 89eb5dd430 [registrar] Mark our generated code as 'extern C'. (#1049)
This makes the function names smaller, saving a tiny bit of space (about 700
bytes for the dont link test app).

It also looks nicer in crash reports.
2016-10-27 16:12:16 -04:00
Rolf Bjarne Kvinge 71a578ee38 [runtime] Remove deprecated and ignored mono option. (#1019)
Setting this option prints this to stdout:

> Mono Warning: option gen-compact-seq-points is deprecated.

and it's ignored, so just don't set this option.
2016-10-27 16:04:19 -04:00
Sebastien Pouliot bbcc872f7a Update XML references from XI C8SR1 2016-10-27 11:55:32 -04:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00
Rolf Bjarne Kvinge e9f125fbcb [mmp] Don't process SDK assemblies for external symbols unless we're embedding mono. Fixes #45902. (#1036)
SDK assemblies might contain P/Invokes to libmono, but unless we link with
mono (which we don't do if we're not embedding mono), the native linker will
complain if we ask it to keep those symbols (using `-u symbol`).

So don't look for __Internal P/Invokes in SDK assemblies in that case.

https://bugzilla.xamarin.com/show_bug.cgi?id=45902
2016-10-26 12:57:11 +02:00
Chris Hamons 448b78c47d [XM] Add StringComparison.Ordinal tweak just like c533db66bf (#1006) 2016-10-20 08:34:26 -05:00
Rolf Bjarne Kvinge 0dd27141d6 [mtouch/mmp] Fix check if an assembly is a framework assembly. Fixes #36109. (#1000)
Fix check if an assembly is a framework assembly to take into account symlinks.

https://bugzilla.xamarin.com/show_bug.cgi?id=36109
2016-10-14 14:14:27 -04:00
Rolf Bjarne Kvinge cf0be91860 [mtouch] CoreAudioKit didn't exist in the simulator until iOS 9. Fixes #44996. (#998)
https://bugzilla.xamarin.com/show_bug.cgi?id=44996
2016-10-14 18:56:08 +02:00
Rolf Bjarne Kvinge 2c950a84ea [mtouch] Treat P/Invokes to 'sqlite3' as equal to 'libsqlite3'. Fixes #42372. (#996)
https://bugzilla.xamarin.com/show_bug.cgi?id=42372
2016-10-14 12:34:51 +02:00
Rolf Bjarne Kvinge c533db66bf [mtouch] Always use ordinal string comparisons. (#995) 2016-10-14 12:34:35 +02:00
Rolf Bjarne Kvinge 2a9f5a8238 Merge pull request #988 from rolfbjarne/bug44709d
Unify stret detection between the generator and platform assemblies, and fix stret detection on watchOS. Fixes #44709.
2016-10-13 19:44:02 +02:00
Chris Hamons 17bb354dca [XM] Fix 44707 by fixing launcher and mmp (#971)
- https://bugzilla.xamarin.com/show_bug.cgi?id=44707
- Sets MONO_CFG_DIR to work around embedding API bug: https://bugzilla.xamarin.com/show_bug.cgi?id=45279
- Added ability to run single XM test by setting XM_TEST_NAME to full test name.
2016-10-13 10:42:05 -05:00
Rolf Bjarne Kvinge 9d85ca79ab Unify stret detection between the generator and platform assemblies, and fix stret detection on watchOS. Fixes #44709.
Unify the code to determine whether a particular return type requires a stret
signature or not between the generator and platform assemblies.

Also fix the stret detection for armv7k, whose calling convention is not
identical to armv7(s): there's the concept of homogeneous structures, which
contains multiple elements of only one type, and which is sometimes passed in
registers on armv7k.

https://bugzilla.xamarin.com/show_bug.cgi?id=44709
2016-10-13 17:35:51 +02:00
Rolf Bjarne Kvinge 084e691be2 [src] Make sure to always set all variants of our conditional compilation symbols. (#986)
For Unified, set XAMCORE_2_0, UNIFIED and __UNIFIED__.

For Xamarin.iOS/tvOS/watchOS set both the normal and underscored versions
(IOS and __IOS__, TVOS and __TVOS__, and WATCHOS and __WATCHOS__).

The underscored versions are the public symbols we're setting in the
corresponding projects, so we should use those everywhere to simplify our
code, but due to historical reasons we're still using the other variants in
existing code.

Making sure all the possible variants are set for all projects, makes it
possible to only use the underscored versions in new code.

Also define `GENERATOR` for the generator, so that we can easily share
files between the generator and platform assemblies.
2016-10-13 15:10:24 +02:00
Rolf Bjarne Kvinge 2f60dd2220 [mtouch] Fix NullReferenceException in PInvoke wrapper generation. Fixes #44763. (#956)
Fix NullReferenceException in PInvoke wrapper generation when incremental
builds are enabled and the linker didn't run because cached results were
found.

https://bugzilla.xamarin.com/show_bug.cgi?id=44763
2016-10-06 16:13:01 +02:00
Rolf Bjarne Kvinge b2634bce56 [mtouch] Set install_name for libpinvokes.dylib. Fixes #44775. (#955)
https://bugzilla.xamarin.com/show_bug.cgi?id=44775
2016-10-06 15:17:40 +02:00
Rolf Bjarne Kvinge 7e1d9820b3 [mtouch] Bundle libpinvokes.dylib in the app. (#954)
Building a dylib is somewhat useless unless it ends up in the app bundle.
2016-10-06 14:16:55 +02:00
Rolf Bjarne Kvinge 6f60992290 [mtouch] Build with -debug so that we get debug information and thus source code location in stack traces. (#953) 2016-10-06 10:24:09 +02:00
Chris Hamons 4bb4e2629d [XM] Teach mmp to set xamarin_debug_mode so mono will read mdb files (#951) 2016-10-06 07:05:12 +02:00
Rolf Bjarne Kvinge d1361d963e Merge pull request #933 from rolfbjarne/watchos-network-api
Bump [watch-]mono to get more API removal for watchOS.
2016-10-04 19:47:10 +02:00
Rolf Bjarne Kvinge 1fdd17e611 [mtouch] Add (another) workaround for file descriptor leak in System.Diagnostics.Process. (#934) 2016-10-03 20:02:28 +02:00
Rolf Bjarne Kvinge a3939b100f [mtouch] Tell Cecil to load assemblies in memory unless they're big assemblies. (#935)
In the recent Cecil update Cecil changed from loading assemblies in memory to
keep a FileStream around and read whenever necessary [1].

This is problematic for us, because we need all the AssemblyDefinitions in
memory at once, and if there are many assemblies, then we'll run into problems
due to the number of file descriptors in use.

So revert to the behavior for the old Cecil: loading assemblies in memory,
unless the assemblies are big, since in that case we might run out of memory
otherwise.

http://cecil.pe/post/149243207656/mono-cecil-010-beta-1
2016-10-03 13:44:51 -04:00
Rolf Bjarne Kvinge c4f4056b22 Bump [watch-]mono to get more API removal for watchOS. 2016-10-03 18:31:04 +02:00
Rolf Bjarne Kvinge 0fa4235097 [mtouch] Don't do any TLS processing in the linker for watchOS.
Don't do any TLS processing in the linker for watchOS, because on watchOS we
don't have (managed) TLS.
2016-10-03 18:31:04 +02:00
Rolf Bjarne Kvinge 0863e412b4 Remove XI/Classic support (#926)
* [tests] Remove Classic SDK tests.

* Remove XI/Classic support.

This also means we can remove support for the legacy registrars.

* [monotouch-test] Remove legacy registrar tests.

* [tests/mtouch] Remove Classic tests (and legacy registrar logic).

* [tests/scripted] Fix tests to reference Xamarin.iOS.dll.
2016-09-30 15:02:17 -04:00
Rolf Bjarne Kvinge 4d06d05cc0 [mtouch] Add workaround for file descriptor leak in System.Diagnostics.Process. (#917) 2016-09-29 17:45:23 +02:00
Rolf Bjarne Kvinge b58b36178b Update list of Facade assemblies. (#916)
These assemblies were added here: 919b89954a
2016-09-29 16:12:31 +02:00
Sebastien Pouliot 9fda816230 [mtouch][linker] Use correct error code for CoreOptimizeGeneratedCode (#915)
Previous PR [1] has the right documentation but the wrong source code.

[1] https://github.com/xamarin/xamarin-macios/pull/903
2016-09-28 23:16:03 -04:00
Sebastien Pouliot 5b80e7f85c [mtouch][linker] Provide a more specific error code when OptimizeGeneratedCodeSubStep fails (#903)
The MT2001 error is a general, something went bad, in the linker code
base. The stack trace is often enough to track down issues but in some
cases it would be easier to ask customers for a specific assembly
(rather than their complete project) to investigate an issue.

Example:

error MT2103: Binding Optimizer failed processing `System.Void GoogleConversionTracking.Unified.GoogleConversionPing::.ctor()`.
--- inner exception
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoTouch.Tuner.OptimizeGeneratedCodeSubStep.ProcessIsDirectBinding (Mono.Cecil.MethodDefinition caller, Mono.Cecil.Cil.Instruction ins) [0x00026] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MonoTouch.Tuner/OptimizeGeneratedCodeSubStep.cs:264
  at MonoTouch.Tuner.OptimizeGeneratedCodeSubStep.ProcessCalls (Mono.Cecil.MethodDefinition caller, Int32 i) [0x00337] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MonoTouch.Tuner/OptimizeGeneratedCodeSubStep.cs:197
  at MonoTouch.Tuner.OptimizeGeneratedCodeSubStep.Process (Mono.Cecil.MethodDefinition method) [0x0007b] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MonoTouch.Tuner/OptimizeGeneratedCodeSubStep.cs:81
  at Xamarin.Linker.StateSubStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00004] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreOptimizeGeneratedCode.cs:48
---
  at Xamarin.Linker.StateSubStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00014] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreOptimizeGeneratedCode.cs:50
  at Mono.Tuner.SubStepDispatcher.DispatchMethod (Mono.Cecil.MethodDefinition method) [0x0001d] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs:215
  at Mono.Tuner.SubStepDispatcher.BrowseMethods (ICollection methods) [0x0001c] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs:167
  at Mono.Tuner.SubStepDispatcher.BrowseTypes (ICollection types) [0x0006b] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs:145
  at Mono.Tuner.SubStepDispatcher.BrowseAssemblies (IEnumerable`1 assemblies) [0x00050] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs:123
  at Mono.Tuner.SubStepDispatcher.Process (Mono.Linker.LinkContext context) [0x0000f] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs:104
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00027] in /Users/poupou/git/xamarin/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker/Pipeline.cs:118
  at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1& assemblies) [0x000ac] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Tuning.cs:79

Right now the MT2001 would only include the inner exception, which does
not include any clue to which assembly caused the exception.

Note: The same pattern to be applied to other BaseSubStep subclasses in
separate commits.

Related to (but not the fix for) https://bugzilla.xamarin.com/show_bug.cgi?id=44701
2016-09-28 11:46:14 -04:00
Sebastien Pouliot da60263a0a [mtouch] Fix NRE when optimizing bindings. Fixes #44701 (#900)
Some binding assemblies contains extra, unneeded code, generated by the C# compiler, e.g.

IL_002f: stloc.0
IL_0030: ldloc.0

which the binding optimizer did not expect.

https://bugzilla.xamarin.com/show_bug.cgi?id=44701
2016-09-27 16:09:42 -04:00
Sebastien Pouliot 4ab6730dd2 [mtouch] Update script to use mono64. Fixes #44122 and others (#887)
Our move to open source and the mtouch/mlaunch split changed mtouch from
a 64bits to a 32bits application (because mono is, by default, still
32bits on OSX).

That's the cause for several recent bugs

* https://bugzilla.xamarin.com/show_bug.cgi?id=44122
* https://bugzilla.xamarin.com/show_bug.cgi?id=44521
* https://bugzilla.xamarin.com/show_bug.cgi?id=44518
* https://bugzilla.xamarin.com/show_bug.cgi?id=44516
2016-09-26 14:47:30 -04:00
Rolf Bjarne Kvinge 86e1e0e882 [mtouch] Show more information about LinkWith attributes. (#895)
* [mtouch] Fix source analysis warning about culture-aware string comparison.

* [mtouch] Show more information about LinkWith attributes.
2016-09-26 16:23:28 +02:00
Rolf Bjarne Kvinge 85cead2337 [mtouch] Don't use nested Parallel.ForEach loops. (#888)
The nested Parallel.ForEach loops don't take into account the outer
MaxDegreeOfParallelism value, causing us to spawn more concurrent tasks than
we want to.

So refactor the code to have one static list of tasks, which each subtask adds
to.
2016-09-23 16:03:23 -04:00
Sebastien Pouliot eb91e692a6 [mtouch] Update script to use mono64. Fixes #44122 and others (#887)
Our move to open source and the mtouch/mlaunch split changed mtouch from
a 64bits to a 32bits application (because mono is, by default, still
32bits on OSX).

That's the cause for several recent bugs

* https://bugzilla.xamarin.com/show_bug.cgi?id=44122
* https://bugzilla.xamarin.com/show_bug.cgi?id=44521
* https://bugzilla.xamarin.com/show_bug.cgi?id=44518
* https://bugzilla.xamarin.com/show_bug.cgi?id=44516
2016-09-23 12:55:11 -04:00
Rolf Bjarne Kvinge 7656a92756 Revert "[mtouch] Don't use nested Parallel.ForEach loops." (#886) 2016-09-23 14:35:43 +02:00
Rolf Bjarne Kvinge fc55e4306f [mtouch] Don't use nested Parallel.ForEach loops. (#881)
The nested Parallel.ForEach loops don't take into account the outer
MaxDegreeOfParallelism value, causing us to spawn more concurrent tasks than
we want to.

So refactor the code to have one static list of tasks, which each subtask adds
to.
2016-09-23 07:02:11 +02:00
Rolf Bjarne Kvinge 88a9b809d2 CFNetworkHandler is not a valid http message handler for watchOS, so show a helpful message if someone tries. (#879) 2016-09-22 18:08:16 +02:00
Rolf Bjarne Kvinge 0db1fe1ff2 [mtouch] Add support for -j X to specify concurrency. (#876) 2016-09-22 09:21:20 -04:00
Rolf Bjarne Kvinge d4edc453a6 Fix default http message handler for watchOS. (#873)
* Fix default http message handler for watchOS.

Fix default http message handler for watchOS to be NSUrlSessionHandler (the
previous attempt at eb7c2fd was quite incomplete), and make sure
HttpClientHandler is never used (show errors if someone tries).

* [tests] Remove explicit http client handler from project files.

Just use the default instead, since the set of valid http client handlers varies between platforms.
2016-09-22 14:29:18 +02:00
Rolf Bjarne Kvinge 1412b5bbed Remove any code related to the IL registrar. (#874)
We've used the dynamic registrar for years now when selecting the IL registrar
(and I've never heard about anybody doing it), so just remove all the related
(and in fact dead) code.
2016-09-22 14:27:54 +02:00
Martin Baulig f3501d99af Remove Mono.Security.Providers.*.dll in preparation of their upcoming removal from the BCL. 2016-09-22 07:23:40 +02:00
Rolf Bjarne Kvinge 821fe4c563 [apidiff] Remove XI/Classic api diff. (#867) 2016-09-21 11:48:28 -04:00
Sebastien Pouliot 702682a1c1 Bump version for SR1 and update the XML for apidiff 2016-09-16 11:07:16 -04:00
Sebastien Pouliot e5a0cef8c8 [apidiff] Update references files to match XI 10.0 (C8) (#813) 2016-09-12 10:49:29 -04:00
Sebastien Pouliot 38148c718a Merge branch 'xcode8' 2016-09-09 15:29:37 -04:00
Rolf Bjarne Kvinge b789deaf8e [mtouch] Require deployment target to be 8+ for incremental builds. (#805)
This is something that changed with 70f1346b: our libxamarin.dylib now
requires iOS 8+, which means the app itself must require iOS 8+ when using
libxamarin.dylib.

This fixes an msbuild failure (Xamarin.iOS.Tasks.IBToolLinking("iPhone").BuildTest):

    Process exited with code 1, command:
    /Applications/Xcode73.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -framework Foundation -framework UIKit /Users/builder/data/lanes/1381/5f73edaa/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.dylib /Users/builder/data/lanes/1381/5f73edaa/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin-debug.dylib -lz -isysroot /Applications/Xcode73.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -Qunused-arguments -miphoneos-version-min=7.0 -arch armv7 -shared -read_only_relocs suppress -install_name @executable_path/libXamarin.iOS.dll.dylib -fapplication-extension -o /Users/builder/data/lanes/1381/5f73edaa/source/xamarin-macios/msbuild/tests/MyIBToolLinkTest/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.armv7.dylib -x assembler /Users/builder/data/lanes/1381/5f73edaa/source/xamarin-macios/msbuild/tests/MyIBToolLinkTest/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.armv7.s -DDEBUG
    ld: warning: embedded dylibs/frameworks only run on iOS 8 or later
    ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@executable_path/libxamarin-debug.dylib) for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
2016-09-08 15:01:48 +02:00
Rolf Bjarne Kvinge b54a6ed3e6 [mtouch] Fix compiler warning (unused variable). (#789) 2016-09-07 21:28:13 +02:00
Rolf Bjarne Kvinge 7a34f5e9bf [mtouch] Fix incremental builds when generating P/Invoke wrappers. Fixes #44048. (#788)
We need to compile the generated P/Invoke wrappers to a dylib, and link the
dylib for the product assembly (Xamarin.WatchOS.dll) with the generated
P/Invoke wrappers.

Since there might be P/Invokes in any assembly, just link in the P/Invoke
wrapper dylib for every assembly.

https://bugzilla.xamarin.com/show_bug.cgi?id=44048
2016-09-07 17:22:34 +02:00
Manuel de la Pena 546a2fd907 [mtouch] Fix case of the final target directory. 2016-09-06 18:19:27 +02:00
Manuel de la Pena 46e6f06919 [mtouch] MVID for symblication ought to be lower case and with no `-` (#749) 2016-09-02 16:25:12 -04:00
Alexander Köplinger 5eba5f78ce Remove wrong System.Private.* facades from Sdk check (#745)
They are no longer shipped since c8c09310f9 and c75dcf579f.
2016-09-02 12:01:55 +02:00
Rolf Bjarne Kvinge 2eb6ba12c7 [mtouch/mmp] Fix build after breaking cecil update in mono.
Also use mono's cecil instead of our own cecil submodule for mtouch.
2016-09-01 18:28:35 +02:00
Manuel de la Pena 4de097effa [mtouch] Better error handling when copying the aot files. (#720) 2016-08-31 08:18:41 -04:00
Rolf Bjarne Kvinge 875afb4260 [mtouch] Do not use the process task to execute the copy of aot files. Use a normal child process that blocks. Adds very little overhead since it is similar to the copy we had in c#. (#718) 2016-08-31 11:14:30 +02:00
Manuel de la Pena dd24c96ae2 [mtouch] Do not use the process task to execute the copy of aot files. Use a normal child process that blocks. Adds very little overhead since it is similar to the copy we had in c#. 2016-08-31 10:01:18 +02:00
Sebastien Pouliot 974ea0b792 Merge branch 'cycle8' into xcode8 2016-08-30 15:40:58 -04:00
Chris Hamons a43115a85e [XM] Fix native dependency processing by mmp when linker is disabled (#613)
* [XM] Fix native dependency processing by mmp when linker is disabled

- https://bugzilla.xamarin.com/show_bug.cgi?id=43364
- Fixed via a hack for now. Fixed https://bugzilla.xamarin.com/show_bug.cgi?id=43419 to clean up later
- Added null check in ProcessDLLImports due to facades
2016-08-30 08:45:03 -04:00
Sebastien Pouliot 1d5bbedc61 Bump maccore to remove classic (monotouch.dll and friends) support from XI (#704)
Also stop processing the API diff for classic assemblies
2016-08-30 08:14:29 -04:00
Rolf Bjarne Kvinge e5bdbdd1ac Allow profiling + incremental builds on bitcode-capable targets again. (#706)
Mono bug [#41428](https://bugzilla.xamarin.com/show_bug.cgi?id=41428) has been fixed now,
which means we have profiler dylibs again, so we can enable profiling + incremental builds again.
2016-08-30 11:39:29 +02:00
Sebastien Pouliot 7149661251 [mtouch|mmp] Add missing frameworks with platform versions (#703)
note: AVFoundation is commented on watchOS 3 as this breaks the static
registrar .a helper built for watchOS.

AVFoundation does a file check to enable some types - but the watchSimulator
include that file, leading to compilation errors later (missing CMTime.h)

	#if TARGET_OS_WATCH
	#if ! __has_include(<AVFoundation/AVAnimation.h>)
	#define AVF_IS_WATCHOS_SDK 1
	#endif
	#endif
2016-08-29 19:22:34 -04:00
Manuel de la Pena 30bd2ad5b3 [mtouch] Fix NRE when we try to copy aot files. (#701) 2016-08-29 13:38:59 -04:00
Rolf Bjarne Kvinge 80c88e9ce4 [linker] Add temporary workaround for bug #43658. (#697)
The real fix for bug #43658 is in mono master, but the current
version of mono master doesn't build for us, so implement this
workaround instead.

The problem is that the linker doesn't preserve fields of nested types marked
in xml descriptions unless the declaring type is marked. So the workaround
(until we can bump mono) is to mark the declaring type.

https://bugzilla.xamarin.com/show_bug.cgi?id=43658
2016-08-29 08:17:57 -04:00
Sebastien Pouliot 6d5beb61cb Merge branch 'cycle8' into xcode8 2016-08-26 08:19:33 -04:00
Sebastien Pouliot 2bcd40054f [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 08:17:01 -04:00
Sebastien Pouliot 0bea77b781 [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 09:24:51 +02:00
Chris Hamons 1c6e1959b7 [XM] Add support for disabling lldb attach on crash (#670)
- https://bugzilla.xamarin.com/show_bug.cgi?id=23482
2016-08-25 13:06:38 -05:00
Chris Hamons 3ad2491006 Fixup C8 static registrar to work w\ Xcode 8 (#647)
* Fix static registrar on 10.12 by teaching it that QTKit is dead (#472)
* Rip out all 64-bit registration in 32-bit XM.
2016-08-25 14:03:43 -04:00
Rolf Bjarne Kvinge e291f1717d Revert "Bump [watch-]mono to master to get fix for #43658." (#665) 2016-08-25 14:44:53 +02:00
Rolf Bjarne Kvinge f6b1ccd748 Bump [watch-]mono to master to get fix for #43658. (#653)
* Bump [watch-]mono to master to get fix for #43658.

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

* [mtouch/mmp] Fix build after breaking cecil update in mono.

Also use mono's cecil instead of our own cecil submodule for mtouch.

* Bump [watch-]mono to get compilation fixes after cecil bump in mono.

* Remove cecil submodule, we only use the one in mono now.
2016-08-25 13:10:14 +02:00
Rolf Bjarne Kvinge bbb081212c [apidiff] Run mono-api-info and mono-api-html from their output directories. (#660)
This way we use the right version of any dependent dlls.

Otherwise we'd build with the cecil version from the mono repository,
and run with the system's cecil.
2016-08-25 11:31:56 +02:00
Rolf Bjarne Kvinge e0b1ac4f75 [mtouch/mmp] Fix debug spew to compile. (#654) 2016-08-24 14:26:56 -04:00
Manuel de la Pena bb528f90dc [Mtouch] Use the mono tools to copy over the msym files. (#622)
* [Mtouch] Use the mono tools to copy over the msym files.

* As per review:

* Do not create a DirectoryInfo when it is not needed.
* Do not throw exceptions for values that can be null, should never
happen.
* Remove unused import.

* Undo a wrong using removal and do the right thing.

* Fix build issues.
2016-08-23 10:29:42 +02:00
Manuel de la Pena a916c9ee06 [mtouch] Remove warning from aot compilation. (#639)
The option was removed because it is default in mono.
2016-08-22 11:26:42 -04:00
Sebastien Pouliot 7619702459 [registrar] Remove tvOS/simulator hack for ExternalAccessory (#619)
Apple now ships the required ExternalAccessory header files

references:
* commit 1190aac04c
  Author: Sebastien Pouliot <sebastien.pouliot@gmail.com>
  Date:   Sun Jul 24 10:44:19 2016 -0400
* rdar#27476259 https://trello.com/c/Okdw58IO
2016-08-16 20:49:22 -04:00
Aleksey Kliger (λgeek) e5132633e5 [linker] Update mscorlib.xml to include Mono.RuntimeStructs (#616) 2016-08-16 17:08:11 -04:00
Sebastien Pouliot 9eca87665a Merge branch 'cycle8' into xcode8 2016-08-16 16:33:25 -04:00
Chris Hamons 1d09e9040b [XM] Fix native dependency processing by mmp when linker is disabled (#613)
* [XM] Fix native dependency processing by mmp when linker is disabled

- https://bugzilla.xamarin.com/show_bug.cgi?id=43364
- Fixed via a hack for now. Fixed https://bugzilla.xamarin.com/show_bug.cgi?id=43419 to clean up later
- Added null check in ProcessDLLImports due to facades
2016-08-16 15:24:01 -05:00
Alexander Köplinger 59125e6f9c [C8] Bump to latest Mono 4.6.0 commit (#602)
* [C8] Bump to latest Mono 4.6.0 commit

Brings in the netstandard updates from https://github.com/mono/mono/pull/3394
We also had to add a new assembly System.IdentityModel.dll to the mobile profiles while doing that work.

* Add System.IdentityModel to Sdk assemblies

Fixes the following mtouch test failure:

```
Xamarin.Linker.SdkTest.iOS_Classic :   BCL
  Expected:
  But was:  < "System.IdentityModel" >

at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x47bec88 + 0x00047> in :0
at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x47bec58 + 0x0001f> in :0
at Xamarin.Linker.SdkTest.BCL (System.String path) <0x47bccf0 + 0x003f3> in :0
at Xamarin.Linker.SdkTest.iOS_Classic () <0x47bcc50 + 0x0001b> in :0
```
2016-08-16 15:09:59 -04:00
Alexander Köplinger e04f2abb19 Add System.IdentityModel to Sdk assemblies (#612)
Fixes the following mtouch test failure:

```
Xamarin.Linker.SdkTest.iOS_Classic :   BCL
  Expected:
  But was:  < "System.IdentityModel" >

at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x47bec88 + 0x00047> in :0
at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x47bec58 + 0x0001f> in :0
at Xamarin.Linker.SdkTest.BCL (System.String path) <0x47bccf0 + 0x003f3> in :0
at Xamarin.Linker.SdkTest.iOS_Classic () <0x47bcc50 + 0x0001b> in :0
```
2016-08-16 11:41:51 -04:00
Chris Hamons e482017fba [XM] Teach XM to add fobjc-runtime=macosx to clang 64-bit builds (#585)
- As requested by Rolf here https://bugzilla.xamarin.com/show_bug.cgi?id=42889
2016-08-15 14:34:35 -05:00
Chris Hamons 0fe8a18229 [XM] Ignore linking requests for extension projects (#575)
- Linking breaks extensions for as long as we have the "extensions must be use static registrar" hack.
- So let's ignore it with a warning. Better that random brokeness.
- https://bugzilla.xamarin.com/show_bug.cgi?id=43197
2016-08-15 14:34:24 -05:00
Chris Hamons a88ab8afc5 [XM] Teach XM to add fobjc-runtime=macosx to clang 64-bit builds (#585)
- As requested by Rolf here https://bugzilla.xamarin.com/show_bug.cgi?id=42889
2016-08-10 15:03:26 -04:00
Sebastien Pouliot 89ffd0c7a8 [tvos][photos[ui]] Enable both Photos[UI] frameworks in mtouch for tvOS (#581) 2016-08-09 15:39:15 -04:00
Chris Hamons 3dd8f846d7 [XM] Ignore linking requests for extension projects (#575)
- Linking breaks extensions for as long as we have the "extensions must be use static registrar" hack.
- So let's ignore it with a warning. Better that random brokeness.
- https://bugzilla.xamarin.com/show_bug.cgi?id=43197
2016-08-09 10:14:27 -05:00
Sebastien Pouliot ff77f85a4c Merge branch 'cycle8' into xcode8 2016-08-08 15:29:36 -04:00
Sebastien Pouliot 921b254adc [watchos][scenekit] Enable SceneKit on watchOS (#563)
* Enable some SceneKit-related WatchKit API
* Enable some SceneKit-related SpriteKit API
* Enable some SceneKit-related Foundation API
* Fix generator to include `using SceneKit;` on watchOS
* Adjust xtro tests since watchOS headers include some stuff that's not available in reality
* Lots of [Watch (3,0)] attributes
2016-08-06 10:59:16 -04:00
Rolf Bjarne Kvinge 44b30892e9 [registrar] Skip any assemblies with the DelayedRegistrationAttribute in the static registrar. (#557) 2016-08-05 18:43:22 +02:00
Sebastien Pouliot 937eb70686 Merge branch 'cycle8' into xcode8 2016-08-04 13:26:08 -04:00
Sebastien Pouliot 2037c5f581 [apidiff] Update definitions to C7SR1 (current stable) (#550)
Also enable tvOS when updating references (Makefile)
2016-08-04 13:23:06 -04:00
Sebastien Pouliot bc72c950b7 [apidiff] Update definitions to C7SR1 (current stable) (#550)
Also enable tvOS when updating references (Makefile)
2016-08-04 13:14:13 -04:00
Chris Hamons 52a8642d2c [XM] Teach mmp to set rpath we we copy frameworks into bundle Framework dir (#506)
- https://bugzilla.xamarin.com/show_bug.cgi?id=42846
2016-08-04 08:35:23 -05:00
Chris Hamons 6f4be16d3a [XM] Fix static registrar.
Rip out all 64-bit registration in 32-bit XM.
2016-08-04 11:54:59 +02:00
Chris Hamons a3b31d154b [XM] Fix static registrar on 10.12 by teaching it that QTKit is dead (#472) 2016-08-04 11:54:59 +02:00
Rolf Bjarne Kvinge c66a44bc12 Teach the static registrar about the lack of ExternalAccessory headers in the tvOS simulator.
This is only applicable to tvOS 10 (i.e. the xcode8 branch),
but applying the patch already helps avoiding merge failures
for other fixes in the same area.
2016-08-04 11:54:58 +02:00
Chris Hamons 798aca0767 [XM] Fix static registrar.
Rip out all 64-bit registration in 32-bit XM.
2016-08-02 17:44:10 +02:00
Rolf Bjarne Kvinge e7a1675436 [registrar] Skip any assemblies with the DelayedRegistrationAttribute in the static registrar. (#507) 2016-07-29 11:33:18 +02:00
Chris Hamons 08ba6a7af7 [XM] Teach mmp to set rpath we we copy frameworks into bundle Framework dir (#506)
- https://bugzilla.xamarin.com/show_bug.cgi?id=42846
2016-07-28 07:49:21 -05:00
Manuel de la Pena c1d2b5c2dc [mtouch] Remove warning when building mtouch. (#491) 2016-07-27 10:58:23 +02:00
Aleksey Kliger (λgeek) 0364c047e6 [mmp] Preserve TransparentProxy::StoreRemoteField (#497)
* Bump mono and watch-mono

* [mmp] Preserve TransparentProxy::StoreRemoteField

This is needed to prevent a mono assert when xamarin-macios is built
with mono master after mono/mono@6b8e96c
2016-07-26 21:09:07 -04:00
Sebastien Pouliot c37f450a09 Merge branch 'cycle8' into xcode8 2016-07-26 11:41:45 -04:00
Rolf Bjarne Kvinge abd5d1ba46 Use dlsym for user assemblies on iOS. (#492)
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].

So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).

https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
2016-07-26 11:39:18 -04:00
Rolf Bjarne Kvinge 130d981b5b Use dlsym for user assemblies on iOS. (#488)
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].

So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).

https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
2016-07-26 08:12:40 -04:00
Chris Hamons 88d83532ef [XM] Fix static registrar on 10.12 by teaching it that QTKit is dead (#472) 2016-07-25 11:58:28 -05:00
Rolf Bjarne Kvinge 1003b14a8e Add multiple new assemblies to the list of known SDK assemblies. (#476)
Fixes the Sdk test:

    Errors and Failures:
    1) Test Failure : Xamarin.Linker.SdkTest.iOS_Classic
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Classic () <0x39ea808 + 0x0001b> in <filename unknown>:0

    2) Test Failure : Xamarin.Linker.SdkTest.iOS_Unified
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Unified () <0x39ede58 + 0x0001b> in <filename unknown>:0

    3) Test Failure : Xamarin.Linker.SdkTest.tvOS
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.tvOS () <0x39eded8 + 0x0001b> in <filename unknown>:0

    4) Test Failure : Xamarin.Linker.SdkTest.watchOS
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.watchOS () <0x39edf58 + 0x0001b> in <filename unknown>:0
2016-07-25 14:50:33 +02:00
Sebastien Pouliot cb38c14bf8 Merge branch 'cycle8' into xcode8 2016-07-25 08:28:26 -04:00
Rolf Bjarne Kvinge 45001cda7d Add multiple new assemblies to the list of known SDK assemblies. (#475)
Fixes the Sdk test:

    Errors and Failures:
    1) Test Failure : Xamarin.Linker.SdkTest.iOS_Classic
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Classic () <0x39ea808 + 0x0001b> in <filename unknown>:0

    2) Test Failure : Xamarin.Linker.SdkTest.iOS_Unified
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Unified () <0x39ede58 + 0x0001b> in <filename unknown>:0

    3) Test Failure : Xamarin.Linker.SdkTest.tvOS
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.tvOS () <0x39eded8 + 0x0001b> in <filename unknown>:0

    4) Test Failure : Xamarin.Linker.SdkTest.watchOS
         BCL
      Expected: <empty>
      But was:  < "System.Net.Http.WinHttpHandler", "System.Numerics.Vectors", "System.Reflection.Context", "System.Reflection.DispatchProxy", "System.Runtime.InteropServices.RuntimeInformation", "System.Security", "System.Xml.XPath.XmlDocument" >

    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x39ec5e0 + 0x00047> in <filename unknown>:0
    at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x39ec5b0 + 0x0001f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.BCL (System.String path) <0x39ea8a8 + 0x003f3> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.watchOS () <0x39edf58 + 0x0001b> in <filename unknown>:0
2016-07-25 08:19:58 -04:00
Sebastien Pouliot 1190aac04c [tvos][externalaccessory] Enable framework on platform (#470)
* Enable ExternalAccessory for tvOS and teach the static registrar about the lack of simulator headers.
2016-07-24 10:44:19 -04:00
Sebastien Pouliot 5a9d8240c2 [watchos][gamekit] Enable GameKit on watchOS (#452)
Apple does not (yet?) ship the headers for GameKit on the watch simulator (radar [1]). The static registrar was tweaked to skip this on the simulator.

[1] https://trello.com/c/Okdw58IO/51-27476259-gamekit-header-files-are-missing-for-watchsimulator
2016-07-22 13:35:59 -04:00
Rolf Bjarne Kvinge 7144ffc53d [registrar] Make sure we include the headers for NS[U]Integer / CGFloat to compile. Fixes #42673. (#464)
https://bugzilla.xamarin.com/show_bug.cgi?id=42673
2016-07-22 19:11:15 +02:00
Rolf Bjarne Kvinge 59aae5425f [registrar] Make sure we include the headers for NS[U]Integer / CGFloat to compile. Fixes #42673. (#465)
https://bugzilla.xamarin.com/show_bug.cgi?id=42673
2016-07-22 19:11:09 +02:00
Rolf Bjarne Kvinge 9b3c97042d Add System.Security.Cryptography.[Algorithms|Primitives] to the list of known SDK assemblies. (#445) (#462)
Fixes the Sdk test:

    Errors and Failures:
    1) Test Failure : Xamarin.Linker.SdkTest.iOS_Classic
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Classic () <0x30d2808 + 0x0004b> in <filename unknown>:0

    2) Test Failure : Xamarin.Linker.SdkTest.iOS_Unified
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Unified () <0x30d5558 + 0x0004b> in <filename unknown>:0

    3) Test Failure : Xamarin.Linker.SdkTest.tvOS
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.tvOS () <0x30d55d8 + 0x0004b> in <filename unknown>:0

    4) Test Failure : Xamarin.Linker.SdkTest.watchOS
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.watchOS () <0x30d5658 + 0x0004b> in <filename unknown>:0
2016-07-22 08:04:58 -04:00
Chris Hamons 9530bdf608 [XM] Fix linker ability to deadstrip library loads from NSObject.mac.… (#448)
* [XM] Fix linker ability to deadstrip library loads from NSObject.mac.cd for new libraries

- Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42177 in Release / Mobile since we can rip out GameController if not used
2016-07-21 12:58:54 -05:00
Rolf Bjarne Kvinge c13e733b8a Add System.Security.Cryptography.[Algorithms|Primitives] to the list of known SDK assemblies. (#445)
Fixes the Sdk test:

    Errors and Failures:
    1) Test Failure : Xamarin.Linker.SdkTest.iOS_Classic
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Classic () <0x30d2808 + 0x0004b> in <filename unknown>:0

    2) Test Failure : Xamarin.Linker.SdkTest.iOS_Unified
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.iOS_Unified () <0x30d5558 + 0x0004b> in <filename unknown>:0

    3) Test Failure : Xamarin.Linker.SdkTest.tvOS
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.tvOS () <0x30d55d8 + 0x0004b> in <filename unknown>:0

    4) Test Failure : Xamarin.Linker.SdkTest.watchOS
         System.Security.Cryptography.Algorithms
      Expected: True
      But was:  False

    at Xamarin.Linker.SdkTest.Facades (System.String path) <0x30d4640 + 0x0006f> in <filename unknown>:0
    at Xamarin.Linker.SdkTest.watchOS () <0x30d5658 + 0x0004b> in <filename unknown>:0
2016-07-20 12:12:47 +02:00
Sebastien Pouliot 52ffb2b251 Merge branch 'cycle8' into xcode8 2016-07-18 14:34:12 -04:00
Manuel de la Pena 53e2129230 [Fix] Ensure that symbolication contains the aotid subdirs that will contain the msym files. 2016-07-18 18:19:25 +02:00
Manuel de la Pena 30ae7cf5a3 [Fix] Ensure that symbolication contains the aotid subdirs that will contain the msym files. 2016-07-18 16:42:00 +02:00
Sebastien Pouliot d29eb7a436 Workaround for #42549 until correct support for symbolification is available in C8 (#410) 2016-07-15 14:01:32 -04:00
Alex Soto af8289880e [IntentsUI] Add IntentsUI framework from Xcode 8 b2 (#400) 2016-07-14 20:42:48 -04:00
Rolf Bjarne Kvinge 63811c85e5 [registrar] Use the correct parameters when generating category methods. Fixes #42489. (#385)
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.

https://bugzilla.xamarin.com/show_bug.cgi?id=42489
2016-07-14 15:33:21 -04:00
Rolf Bjarne Kvinge 724308cb0d [registrar] Forward-declare ObjC classes. Fixes #42454. (#395)
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.

The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).

https://bugzilla.xamarin.com/show_bug.cgi?id=42454
2016-07-14 15:28:57 -04:00
Rolf Bjarne Kvinge ddfad1bc88 [registrar] Use the correct parameters when generating category methods. Fixes #42489. (#396)
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.

https://bugzilla.xamarin.com/show_bug.cgi?id=42489
2016-07-14 18:42:30 +02:00
Alex Soto aef1775532 [Intents] Add Intents bindings from Xcode 8 b2 2016-07-14 04:02:12 -05:00
Sebastien Pouliot cf27c2e7a8 Merge branch 'cycle8' into xcode8 2016-07-13 16:43:00 -04:00
Rolf Bjarne Kvinge a7a0bb4f05 [registrar] Forward-declare ObjC classes. Fixes #42454. (#387)
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.

The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).

https://bugzilla.xamarin.com/show_bug.cgi?id=42454
2016-07-12 20:34:18 -04:00
Rolf Bjarne Kvinge 5e7f53ff38 [mtouch] Reword MT0094 to make it clearer it's an informational message, and no action is required on the user side. (#381) 2016-07-12 20:21:03 -04:00
Sebastien Pouliot b16a95b0d1 [tvos] Enable MultipeerConnectivity and ReplayKit frameworks, existing in iOS but just added in tvOS 10 (#361)
* Xcode 8 beta 2 tvOS SDK does not ship ExternalAccessory headers for the simulator (but the framework itself is present) so it's not yet enabled (causing registrar build issues)

https://trello.com/c/2e2VdbGR/49-27266975-externalaccessory-header-files-are-missing-for-appletvsimulator

* MapKit was not added for 9.2 - it's added now (and will be fixed in master/cycle8 later)
2016-07-10 11:15:45 -04:00
Alex Soto 074c4f6530 [UserNotificationsUI] Add UserNotificationsUI framework from xcode 8 beta 1 2016-07-04 14:41:22 -05:00
Alex Soto 046a3fad30 [UserNotifications] Add UserNotifications framework xcode 8 beta 1 2016-07-04 14:39:45 -05:00
Rolf Bjarne Kvinge 01775dfd2e [mtouch] Make sure to reference mono_profiler_startup_log so that the native linker doesn't remove the symbol. Fixes #41666. (#340)
https://bugzilla.xamarin.com/show_bug.cgi?id=41666
2016-07-04 13:26:12 -04:00
Rolf Bjarne Kvinge b6189e9165 [mtouch] Make sure to reference mono_profiler_startup_log so that the native linker doesn't remove the symbol. Fixes #41666. (#340)
https://bugzilla.xamarin.com/show_bug.cgi?id=41666
2016-07-04 13:25:34 -04:00
Aleksey Kliger (λgeek) fad331ff76 [mmp] Preserve TransparentProxy::LoadRemoteFieldNew (#339)
This fixes an assert that `tp_load != NULL` on osx when xamarin-macios is built
with mono master after mono/mono@787e34ae2d
2016-07-01 09:57:25 -04:00
Vincent Dondain 5be3587db5 [homekit] Update for iOS 10 beta 1 (#324) 2016-06-30 08:31:40 -04:00
Rolf Bjarne Kvinge e2cd699b27 [registrar] Don't return from trampolines without going through proper state handling code. (#322)
Fixes a COOP crash due to invalid state.
2016-06-29 15:10:24 -04:00
Rolf Bjarne Kvinge 7e773080a9 Merge remote-tracking branch 'origin/master' into xcode8 2016-06-29 10:23:03 +02:00
Manuel de la Pena 19cceab4d5 [mtouch] Reenable the symbolication to allow debugging and update its implementation. (#284) 2016-06-28 14:35:05 -04:00
Sebastien Pouliot 67470d439c [mtouch] Quote the .dylib used for incremental builds. Fixes #42006 (#303)
Fix MT3001 AOT errors due to incorrect paths.

https://bugzilla.xamarin.com/show_bug.cgi?id=42006
2016-06-28 12:51:05 -04:00
Timothy Risi c94d0e7b70 Merge branch 'master' into xcode8 2016-06-23 10:45:09 -08:00
Rolf Bjarne Kvinge f3e08d0502 [mtouch] Set the soft heap limit to 8m on watchOS. (#258) 2016-06-22 06:11:40 -07:00
Rolf Bjarne Kvinge c560fee268 [registrar] Managed characters are equivalent to shorts in native code. (#259)
Fixes NSCharacterSetTest.NSMutableCharacterSet_TestStaticSets when
running with the P/Invoke wrapper (for exceptions) enabled (i.e.
watchOS), since otherwise the wrapper would truncate char parameters
to byte.
2016-06-22 05:47:13 -07:00
Vincent Dondain aae5a73543 [messages] New framework in iOS 10.0 beta1 (#190) 2016-06-21 08:56:38 -04:00
Sebastien Pouliot 1659e121f0 Merge branch 'master' into xcode8 2016-06-20 20:48:14 -04:00
Alex Soto 5225450521 [VideoSubscriberAccount] Add VideoSubscriberAccount from xcode8 beta1
* Added VideoSubscriberAccount binding
* Ensured we link against VideoSubscriberAccount
* Ensured introspection tests pass
2016-06-18 14:38:02 -05:00
Alex Soto 29b47a8c7d [Speech] Add Speech Framework from Xcode 8 Beta 1
* Added Speech Framework bindings
* Ensured introspection test pass
* Ensured we link against Speech framework
* FIXME: SFSpeechRecordingRecognitionRequest is not in the public api
  filled radar://26799291 https://trello.com/c/s6s6YKua
2016-06-18 14:22:06 -05:00
Alex Soto 7c66cbf736 [CallKit] Add CallKit framework binding from xcode 10 beta1 (#189)
* Added CallKit Bindings
* Ensure CallKit.framework is linked
* Ensure CallKit passes introspection tests
* FIXME: https://trello.com/c/afWXDZ3A
  Headers says CallKit is available on macOS 10.12
  but uses AVAudioSession and it is iOS only
  Opened Radar awaiting response.
2016-06-18 06:20:38 -07:00
Aleksey Kliger (λgeek) a46d86948c [linker] Adjust RemoveCode.cs not to remove MonoMethodMessage (#226)
Fixes Bug5354 in linker-ios/dont link/AotBugs.cs when compiled with Mono master.
2016-06-17 15:51:19 -07:00
Aleksey Kliger (λgeek) 8474a21176 [runtime] Add MonoMethodMessage::InitMessage to linker descriptors (#172)
It's called from the runtime mono_message_init method since
 Mono commit 83f37161192b7735ffd04a4235253d790eefff99
2016-06-10 13:21:19 -04:00
Rolf Bjarne Kvinge 386c15c503 Merge pull request #153 from rolfbjarne/more-exceptions
Handle any exceptions when returning from managed code back to our native runtime.
2016-06-09 18:13:23 +02:00
Rolf Bjarne Kvinge fac7270eb8 [registrar] Rewrite ctor's super call to invoke objc_msgSendSuper directly. Fixes #41319. (#159)
There's a clang bug [2] where if a selector is marked as unavailable,
it's marked as unavailable for every class, not just the class where
the unavailable selector is.

This means that we can't do `[super initWithCoder:x]` anywhere,
because `initWithCoder:` is marked as unavailable for UIActivityViewController.

So instead rewrite the call to super to call objc_msgSendSuper
directly, circumventing clang's broken availability checks.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41319
[2] https://llvm.org/bugs/show_bug.cgi?id=28058
2016-06-09 17:18:35 +02:00
Rolf Bjarne Kvinge b213ddd6c3 [registrar] Fix the old static registrar according to internal signature changes. 2016-06-09 13:18:45 +02:00
Rolf Bjarne Kvinge 2d28e24837 [runtime] Handle any exceptions whenever we return from managed code. 2016-06-08 20:05:54 +02:00
Chris Hamons 06c18bd887 [XM] Add release value option to msbuild/mmp to resolve XM 4.5 assemb… (#150)
[XM] Add release value option to msbuild/mmp to resolve XM 4.5 assemblies from system GAC

- This option "reverts" a C7 fix that prevented resovling assemblies from the GAC, which is unsafe
- If you use this option, you need to know what you are doing. The mono BCL and the XM BCL need to be compatible
- Use strictly puts you in the no support "you get to keep the pieces if it breaks" category.
2016-06-08 12:47:09 -04:00
Sebastien Pouliot fcd270cc37 [apidiff] Update references definition to C7 stable (XI 9.8 / XM 2.8) (#142)
Newer apidiff from master will compare to C7 (instead of C6)
2016-06-07 17:04:37 -04:00
Rolf Bjarne Kvinge 6c0374a29a [jenkins] Run the api diff. (#73) 2016-06-02 14:30:17 +02:00
Rolf Bjarne Kvinge 6a58755389 [linker] Add Mono.Security.Provider.NewTls as known SDK library. (#118) 2016-06-02 11:11:37 +02:00
Rolf Bjarne Kvinge ca5bcb5c55 [mtouch] Fix the old static registrar output after the latest coop changes. (#115) 2016-06-02 09:17:17 +02:00
Rolf Bjarne Kvinge ad88558d82 [mtouch] Tweak error message for MT0073 and MT0074. Fixes #40606. (#111)
https://bugzilla.xamarin.com/show_bug.cgi?id=40606
2016-06-01 19:18:35 +02:00
Rolf Bjarne Kvinge a35c2df3ff [mtouch] Don't bundle libmono-profiler-log.dylib unless profiling is enabled. (#113) 2016-06-01 16:58:46 +02:00
Rolf Bjarne Kvinge a8c2c3f617 [mtouch] Unassigned unused error message. (#110) 2016-06-01 16:33:03 +02:00
Rolf Bjarne Kvinge e578af0931 [mtouch] Disable fastdev if profiling+fastdev is enabled on a bitcode-capable platform. (#114)
This is because Mono doesn't build a libmono-profiler-log.dylib when
bitcode is enabled, so we can't support profiling + fastdev at the same
time.

Hopefully mono will fix this (see bug#41428) soon, in which case
this code can be removed.

https://bugzilla.xamarin.com/show_bug.cgi?id=41428
2016-06-01 16:29:04 +02:00
Chris Hamons f3602b4e93 Fix tests broke by 47dc0f26c9 (#99) 2016-05-28 12:06:32 -04:00
Rolf Bjarne Kvinge 00f39e4390 [mtouch] Force min deployment target to 9.0 when enabling bitcode. 2016-05-26 17:47:10 +02:00
Zoltan Varga bcf86f4ff2 [mtouch] Link non-bitcode ios apps with -lc++ if ENABLE_BITCODE_ON_IOS is set, since the mono libs require it. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge af0d01c93a Initial review pass for COOP for watchOS. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge ac5ff5e321 [runtime] Replace xamarin_try_get_nsobject with xamarin_has_nsobject.
Removes one usage of ObjectWrapper, since we don't actually need
the return value, we just need to know if an object exists.
2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge 0537fa6622 [registrar] Cope with nameless parameters. (#91) 2016-05-26 16:12:16 +02:00
Rolf Bjarne Kvinge 54976d90ce [registrar] Remove debug spew. (#89) 2016-05-26 16:03:32 +02:00
Chris Hamons ca028ea150 [Mac] Add support for os x extensions (#83) 2016-05-25 17:20:33 -04:00
Chris Hamons 47dc0f26c9 Mmp readonly fix (#82)
* [XM] Teach XM's mmp tool to handle read only assemblies/native libs

- https://bugzilla.xamarin.com/show_bug.cgi?id=41037
- mmp should also promote any install_name_tool errors to "real" errors

* Bump maccore
2016-05-25 16:29:33 -04:00
Sebastien Pouliot 2dd895e3fe [mtouch] Set default for dlsym to false for iOS (like tvOS and watchOS) (#60)
In cycle 7 we turned off, by default, the `dlsym` option (i.e. looking
up symbols for p/invoke) for tvOS and watchOS.

However we decided to wait for iOS to see if this caused issues for
existing code base. There has not been such reports (for tvOS) so,
for cycle 8, we'll turn it off (and use direct calls) for iOS.

If problems arise during the alpha/beta of C8 then we still can
revert this change easily.
2016-05-17 18:35:31 +02:00
Rolf Bjarne Kvinge cffc2e9181 Rewrite user-visible messages to use 'cooperative mode' instead of 'coop'.
This seems to be how we describe it publicly: http://tirania.org/blog/archive/2015/Dec-22.html
2016-05-17 11:30:38 +02:00
Rolf Bjarne Kvinge 2f2ac89da7 [mtouch] Remove misleading comment.
mtouch calculates the exact set of native functions to reference now,
so there's no need to sync anything.
2016-05-17 11:24:04 +02:00
Rolf Bjarne Kvinge 62cbe7e1f6 [mtouch] Fix logic to detect if simlauncher can be used. 2016-05-17 11:24:04 +02:00