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

1183 Коммитов

Автор SHA1 Сообщение Дата
Alexander Köplinger e42e1e8fce Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-09 21:06:44 +02:00
Rolf Bjarne Kvinge 8792992b79
[registrar] Make Runtime.GetINativeObject_Static take token references instead of type names. (#5879)
Saves some space in the executable by using 32-bit sized integers instead of much longer strings.
2019-04-09 16:47:33 +02:00
Manuel de la Pena dc697dd5ef
[XHarness] Ignore monotouch_Microsoft.CSharp_xunit-test.dll until issue 5868 is fixed. (#5869)
If not ignored, we will have an issue building the test app on device
resulting on a failure.
2019-04-09 12:57:27 +02:00
Alex Soto 6e2eddd328
[devops] Add azure devops build support (#5873) 2019-04-09 05:35:08 -04:00
Chris Hamons d98c22e39f
[mmp] Don't apply libintl hack when you explicitly ask for that file (#5855)
- A long while ago, this hack was added to mmp:

 	// Shutup the warning until we decide on bug: 36478
	if (shortendName.ToLowerInvariant () == "intl" && IsUnifiedFullXamMacFramework)

- This breaks use cases were we explicitly ask for that file, so let's
fix that for now until we can fix the root cause for real
2019-04-08 10:26:23 -05:00
Sebastien Pouliot 1664cf6426 Merge branch 'master' into mono-2019-02 2019-04-05 15:53:37 -05:00
Sebastien Pouliot d66375d275 [linker] Remove new memory allocations (List) in the sealer 2019-04-05 14:01:44 -05:00
Sebastien Pouliot fad23e95b2
Small fixlets to select better overloads / unneeded parameters (#5844) 2019-04-05 09:43:22 -05:00
Alexander Köplinger 067cbf0a28 Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	tools/mmp/driver.cs
2019-04-05 11:19:11 +02:00
Alexander Köplinger cc58acdcd3 Bump mono
Commit list for mono/mono:

* mono/mono@6717c3422a [2019-02] Bump linker to latest master (#13818)
* mono/mono@6d2f150690 Add regression test
* mono/mono@fe613fb067 Add reflected class to event methods

Diff: a1fc070eb5...6717c3422a
2019-04-03 23:53:09 +02:00
Alexander Köplinger 7c73d70b4f [linker] Don't remove RuntimeCompatibilityAttribute from assembly
It's needed at runtime since it changes exception handling behavior.

The "link sdk" Linker_RuntimeWrappedException() test relies on it,
but this never showed up there since "link sdk" doesn't link the main assembly.
2019-04-03 23:52:18 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Alexander Köplinger 02176dc5de HttpClientHandler is still in System.Net.Http.dll and use short string for http handler in runtime-options.plist 2019-04-02 17:20:58 +02:00
Sebastien Pouliot 56d87eebba [linker] Adjust HttpClientHandler selection with the new (non BCL) location of the handlers 2019-04-01 21:24:24 -05:00
Sebastien Pouliot a9f8d7b379
[mtouch][mmp] Add control over the the linker new `BeforeFieldInit` optimization (#5820)
Add an mtouch/mmp optimization flag to control this new optimization since
3rd party code (in particular binaries) might depend on this side effect.
2019-04-01 21:21:56 -05:00
Sebastien Pouliot 9ebebf9f42
[linker] Teach linker to accept old (before optimization) bindings (#5823)
Existing binding binaries won't have the `[Preserve]` attribute on
the `Handler` field and, with the new optimization, would not work
properly.

This tweak make sure that older, already linker-safe, bindings will
remain this way (safe) in this (and future) versions of both iOS and
macOS SDK.
2019-04-01 09:35:14 -05:00
Alexander Köplinger bcae65f998 MTouch: Always add GSS framework when mono-native is used
According to Rolf it's fine to always add since the native linker will
figure out if it's really needed and so customers don't need to do
anything when using -all_load.
2019-03-27 11:14:53 +01:00
Alexander Köplinger 1cb9c5b068 Fix MT1015() mtouch test
Mono started using System.IO.File from CoreFX and it has a different
behavior for File.Copy() when the target is a directory:
It just puts the file into the directory instead of raising an exception.

In order to fix the MT1015 test we just check ourselves whether the target
is a directory.
2019-03-26 12:41:48 +01:00
Alexander Köplinger 032145f99b mmp: Require mono-native even for Classic mode
Many BCL APIs call into it now.
2019-03-25 16:37:37 +01:00
Alexander Köplinger f67ca65e95 mmp: Add -lc++ to clang arguments
We need to link with C++ now since Mono requires it on Desktop now.
2019-03-25 16:30:52 +01:00
Alexander Köplinger b23e775fbc Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-25 00:29:17 +01:00
Manuel de la Pena 56a304ea0e
[XHarness] Make TvOS and WatchOS use their test dlls. (#5794)
Up to this commit the test dlls used for the bcl tests were from iOS. Since
the Mono SDK provides the dlls for both missing platforms (TvOS and
WatchOS) we can now use the correct path for the dlls.

There is a small trick to minimize the project generation, since there
is a simple stirng.Replace, the logic now checks the platform under
test and does:

* TvOS - Goes from monotouch_TEST_NAME to monotouch_tv_TEST_NAME
* WatchOS - Gores from monotouch_TEST_NAME to monotouch_watch_TEST_NAME
2019-03-24 18:54:15 +01:00
Alexander Köplinger a4702c465c Update pdb files in install-source tool 2019-03-22 12:20:07 +01:00
Alexander Köplinger 9b039e0f9d Fix linker paths 2019-03-22 11:19:35 +01:00
Alexander Köplinger 0e249818d2 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-22 10:32:58 +01:00
Manuel de la Pena 1615b28ed1
[XHarness] Reduce the number of test applications for the BCL tests. (#5768)
This commit improves the state of the BCL testing in the following ways:

1. Improve the device tets running. Less apps, faster results.
2. WatchOS apps are left as they were to ensure that we do not have deplouyment/run issues.

We now support the ignore files per assembly name to simplify the
tracking of the ignored tests. All
2019-03-20 12:10:18 +01:00
Alexander Köplinger ca76be3bea Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-19 16:17:35 +01:00
Sebastien Pouliot 0dbc584977
[mtouch] Fix warning in RemoveBitcodeIncompatibleCodeStep.cs (#5787)
```
/Users/poupou/git/master/xamarin-macios/tools/linker/MonoTouch.Tuner/RemoveBitcodeIncompatibleCodeStep.cs(14,7): warning CS0105: The using directive for 'Xamarin.Linker' appeared previously in this namespace [/Users/poupou/git/master/xamarin-macios/tools/mtouch/mtouch.csproj]
```
2019-03-19 08:56:14 -05:00
Sebastien Pouliot 5c321ac89d
[mtouch] Update validations around --interpreter (#5772)
This also centralize other interpreter checks and options in the same
location (making it easier to read / update).

* Warn and switch the REPL if the interpreter is enabled on simulator

Why ? It's confusing to build the same code using different options for
simulator and devices. This is what happens if you try to use features
like `dynamic` or `System.Reflection.Emit`.

So instead of an error, we warn that the interpreter is not supported
and switch to the existing REPL mode.

The JIT remains the only option for the simulator but it allows testing
features without a device.

* Fail early if the interpreter is used on 32bits [1]

The current interpreter only works on 64 bits (so ARM64). However the
error won't be reported, back to the developer, until deployment time.

This temporary [1] fix spot the condition very early and report an error

```
error MT0099 : Internal error : The interpreter is currently only available for 64 bits.
```

instead of the current one at deploy time

```
IncorrectArchitecture: Failed to find matching arch for 32-bit Mach-O input file /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.tNKDlx/extracted/X.app/X
error MT1006: Could not install the application 'X.app' on the device 'Mercure': AMDeviceSecureInstallApplicationBundle returned: 0xe8000087 (kAMDIncorrectArchitectureError).

Application could not be uploaded to the device.
```

[1] https://github.com/mono/mono/issues/9871

* [tests] Fix/renumbered MT0138

The test was using simulator + interpreter which is not _really_
possible, we use REPL in that case - so we're now checking if
assemblies were specified with `--interpreter` to cover both cases.

Also 0138 was already used by `mmp` and the warning was **not**
registered or documented in the errors documents. To avoid
confusion it has been renumbered to 0142 and documented.
2019-03-19 08:22:39 -05:00
Alexander Köplinger 66ebb76e71 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-18 19:24:52 +01:00
Rolf Bjarne Kvinge 18b13ac876
[runtime] Use mono_array_setref instead of mono_array_set. (#5782)
* [Foundation] Add an NSArray.FromNSObjects overload that can take an array of INativeObjects.

* [runtime] Use mono_array_setref instead of mono_array_set.

Otherwise the GC won't know about the assignment, and the assigned value can
be freed if it's no longer referenced anywhere else.
2019-03-18 15:00:32 +01:00
Alexander Köplinger fe92aab5bb Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	external/mono
#	src/Foundation/NSUrlSessionHandler.cs
2019-03-18 14:35:46 +01:00
Alexander Köplinger c2bd7011e2 Fix processing of tools/common/StringUtils.cs in XamarinSourcesPathMangler.cs 2019-03-16 02:48:14 +01:00
Sebastien Pouliot 61372a06ba
[mtouch] Disable some optimizations when the interpreter is enabled (#5770)
Some optimizations are not safe to apply when dynamically loading code
at runtime. This is not possible when ahead-of-time (AOT) compilation
is used, so those options were always enabled in the past. The
interpreter is changing the situation so those optimizations are now
disabled, when the interpreter is enabled.

The disabled optimizations are:

* 'remove-dynamic-registrar' when using the interpreter

This avoid the following exception when unknown (at build time) code
tries to register (at runtime)

```
Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ObjCRuntime.RuntimeException: Can't register the class SubclassDemo.CustomView when the dynamic registrar has been linked away.
```

* 'inline-isdirectbinding' when using the interpreter

This avoid crashing (at runtime) when types are subclasses by the
interpreter (code unknown to `mtouch` at build time).

* 'register-protocols' when the interpreter is enabled

Dynamically loaded code can include protocols. When the optimization is
enabled then they won't be registered and won't work as expected.

Note: It is possible to re-enable the optimization(s), either one or all,
if the interpreter is not used to dynamically load code at runtime.
2019-03-15 09:05:53 -05:00
Sebastien Pouliot aa1aa68d07
[mtouch] Avoid MT0109 warnings when --repl (or --interpreter) is used (#5771)
In both cases we use a different binaries for a few assemblies. They
 include support for SRE and a few other things that are not normally
 usable on iOS. That's totally fine and not something that can be fixed
 (unless you stop using the feature). So this PR simply ignore that
 specific case so we don't warn about things that can't be changed (and
 are not a problem)

 E.g.
 ```
 Warning MT0109: The assembly 'mscorlib.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/mscorlib.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.Core.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.Core.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.Xml.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.Xml.dll). (MT0109) (XXX)
 ```
2019-03-15 09:02:08 -05:00
Alexander Köplinger ed3acacd10 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-15 14:30:26 +01:00
Sebastien Pouliot d90d96ab2b
[mtouch] Consider deployment and simulator availability versions for frameworks. Fixes #5753 (#5765)
E.g. `MetalPerformanceShaders` is unusable in 10.3.1 on the simulator so
trying to build with the static registrar cause simlauncher to be rebuilt
with a **strong** (and not _weak_) reference to the framework. This cause
a crash then the application start

```
Dyld Error Message:
  Library not loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders
  Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/95679F95-CCE7-4733-8376-35E91E97039C/data/Containers/Bundle/Application/0F665B2D-ADAC-4CA0-BD04-33E968B3F268/FailerApp.app/FailerApp
  Reason: no suitable image found.  Did find:
	/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders: mach-o, but not built for iOS simulator
```

ref: https://github.com/xamarin/xamarin-macios/issues/5753
2019-03-14 08:12:42 -05:00
Sebastien Pouliot ea96b2299a
[mtouch] Make the SealerSubStep a configurable optimization (#5766)
document it and adjust the optimization tests.

This allows the optimization to be:
* disabled (if ever needed) on fully AOT'ed applications
* re-enabled for the interpreter (at your own risk)
2019-03-14 08:12:17 -05:00
Alexander Köplinger 8274161551 Update mmp/mtouch projects to add new linker files and adapt to new logic 2019-03-13 00:34:52 +01:00
Manuel de la Pena 3fc1e32adb
[XHarness] Reenable the NUnit System.Data tests on mac os x. (#5749)
Fixes https://github.com/xamarin/maccore/issues/1192
Fixes https://github.com/xamarin/maccore/issues/1193
2019-03-11 18:50:18 +01:00
Manuel de la Pena 5bfbefab14
[XHarness] Reneable System.Security nunit tests on mac os x. (#5751)
Fixes  https://github.com/xamarin/maccore/issues/1197
2019-03-11 12:08:10 +01:00
Manuel de la Pena 9eb75dda71
[XHarness] Reenable the System.Core tests on mac os x. (#5743)
Fixes https://github.com/xamarin/maccore/issues/1191
2019-03-08 17:02:15 +01:00
Rolf Bjarne Kvinge 99e727c90b
Merge pull request #4904 from xamarin/mono-2018-10
Bump to mono:2018-10
2019-03-08 11:06:50 +01:00
Manuel de la Pena 112502c081
[Xharness] Reenable the SystemXml tests on mac os x. (#5735)
Fixes https://github.com/xamarin/maccore/issues/1201
Fixes https://github.com/xamarin/maccore/issues/1202
2019-03-07 17:19:47 +01:00
Manuel de la Pena bc3b5a2d43
[Tests] Fix the tests.sln to include the new test projects. (#5720)
Update the sun and ensure that the GUID of the projects are always the same to make the .sln file happy.
2019-03-07 13:14:53 +01:00
Manuel de la Pena cad438dcfa
[XHarness] Reenable the System.Configuration tests on mac os x. (#5702)
Reenable the tests and add support to ignoring certain tests depending
on the version of the mac os x that is under test. The
System.Configuration tests make no sense in Modern.

Fixes https://github.com/xamarin/maccore/issues/1189
Fixes https://github.com/xamarin/maccore/issues/1190
2019-03-07 13:09:56 +01:00
Sebastien Pouliot 2eb178c7cd
[apidiff] Remove the `_*` noise in XM diffs (#5721)
Fix comparison so the XM profiles do not report _inexistent_ changes for `_Attribute`, `_EventInfo` and `_Exception`. That noise makes it harder to review the diffs (for us) and is incorrect in our published API diffs (for release notes).

Also
* Delete .unzip.stamp on clean
* Skip classic XM diff (binaries won't change)
2019-03-06 11:02:50 -05:00
Manuel de la Pena e3153dcfbe
[Xharness] Reenable MonoPoxis tests on mac os x. (#5711)
Fixes https://github.com/xamarin/maccore/issues/1190
Fixes https://github.com/xamarin/maccore/issues/1188
2019-03-05 11:26:59 +01:00
Manuel de la Pena 92ebe5b64a
[XHarness] Reenable SystemServiceModelTests on mac os x. (#5710)
Fixes  https://github.com/xamarin/maccore/issues/1198
2019-03-04 18:17:56 +01:00
Manuel de la Pena 568d19944d
[XHarness] Reneable SystemIdentityModelTests on mac os x. (#5708)
Fixes  https://github.com/xamarin/maccore/issues/1194
2019-03-04 17:42:07 +01:00