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

202 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge ad7d08a63d
Always create binlogs during the build. (#12331)
On CI we'll collect all the binlogs in the repository and make them available
for post-build analysis if need be, so this will make it easier to diagnose
build problems.
2021-08-04 09:30:16 +02:00
dotnet-maestro[bot] 68476989f4
[main] Update dependencies from dotnet/installer (#12245)
* Update dependencies from https://github.com/dotnet/installer build 20210727.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21376.3 -> To Version 6.0.100-rc.1.21377.4

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21370.1 -> To Version 6.0.100-preview.6.21376.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump Mono.Cecil from 0.11.3 to 0.11.4.

* [dotnet-linker] Reference Mono.Cecil 0.11.4 directly.

Works around https://github.com/mono/linker/issues/2173.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-07-28 09:46:36 +02:00
Rolf Bjarne Kvinge 732c27afb3
[builds] Use the dotnet-install.sh script to install .NET locally. (#12050)
Hopefully this will solve issues with random curl errors (56) that happens
when trying to download .NET (and which break the build randomly).
2021-06-30 14:02:12 -04:00
Rolf Bjarne Kvinge aa7e9d06d1
[configure] Add option to use a locally built dotnet/runtime. (#11643)
* Add a configure option to use a locally built dotnet/runtime.
* Add documentation how to build dotnet/runtime the way we need it built.
* Modify our build to consume the custom dotnet/runtime if so configured.

This is useful when trying to debug the runtime locally, or trying out new
features there are no packages for yet.

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2021-05-21 22:18:25 +02:00
Rolf Bjarne Kvinge 6225cac669
[msbuild/dotnet] Fix build logic when using .NET to not try to use nor require any version of installed Xamarin.iOS/Xamarin.Mac. Fixes #10827. (#11433)
* [dotnet] Ship the buildinfo file.

* [msbuild/dotnet] Fix build logic when using .NET to not try to use nor require any version of installed Xamarin.iOS/Xamarin.Mac. Fixes #10827.

We do this by setting the _XamarinSdkRoot variable in our .NET logic, which
our existing shared build logic reads, passes to the DetectSdkLocations task,
and then sets our override environment variable
(MD_MTOUCH_SDK_ROOT/XAMMAC_FRAMEWORK_PATH) to the install location, so that
existing code (which honors the override variable) continues to work as-is.

Fixes https://github.com/xamarin/xamarin-macios/issues/10827.
2021-05-04 21:36:48 -04:00
dotnet-maestro[bot] e8f437319a
[main] Update dependencies from dotnet/installer (#11175)
* Update dependencies from https://github.com/dotnet/installer build 20210408.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21208.1

* Update dependencies from https://github.com/dotnet/installer build 20210409.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21209.4

* Update dependencies from https://github.com/dotnet/installer build 20210410.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21210.1

* same P4 specific fix as ccb43cba56
but the ICU support was added based on P3 but merged after ^

* Update dependencies from https://github.com/dotnet/installer build 20210412.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21212.5

* Update dependencies from https://github.com/dotnet/installer build 20210413.70

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21213.70

* Update dependencies from https://github.com/dotnet/installer build 20210414.14

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21214.14

* Update to new package names

Thanks @pjcollins for the heads up https://github.com/xamarin/xamarin-macios/pull/11175#issuecomment-819936692

* Update dependencies from https://github.com/dotnet/installer build 20210415.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.1

* Fix build (path changed to include '.mono')

* remove more '.mono' special case that are not needed anymore

* Update dependencies from https://github.com/dotnet/installer build 20210415.12

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.12

* Fix building apps (it now finds the native libs)

Credits to @filipnavara

8325f8dadc

* Add back IsTrimmable (or nothing gets linked)

* Update dependencies from https://github.com/dotnet/installer build 20210418.6

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21218.6

* Keep downloading the CoreCLR runtime packs.

* [runtime] Adjust the build to link with the correct runtime library for CoreCLR.

* [tests][monotouch-test] Ignore NSTimeZoneTest / All_28300 on dotnet as it hangs

Introduced with https://github.com/dotnet/runtime/pull/48931

Issue https://unicode-org.atlassian.net/browse/ICU-21591
PR https://github.com/unicode-org/icu/pull/1699

* [dotnet][msbuild] Add more (missing) '\'

Fix satellite/location assemblies and some unit tests

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-04-20 09:09:56 -04:00
Rolf Bjarne Kvinge c8b6bc6c85
[dotnet] Build macOS/.NET for ARM64 as well. (#10959)
Partial fix for #10959.
2021-03-25 07:26:48 +01:00
mathieubourgeois a921ee2fb1
Xamarin.Mac native Apple Silicon targetting support (#10115)
* Add support for Xamarin.Mac arm64

* Add compile product definition task

Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures.

* Don't reference dynamic objC_send on arm64

When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64.

* Fix improper delete/move with already existing directories

* Fix stret requirement for Xamarin.Mac in arm64.

The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64.

* Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app

* Re-generalize some mmp registrar rules

`Microsoft.macOS.registrar` was missed by the current rule set

* Fix mmp tests

* Set E7072 as not translated

Tests were failing otherwise

* Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same)

* Fix style issues

* Fix `ToLower` usage for invariant usage

* Fix xtro-sharpie test
2021-03-17 21:48:02 -04:00
Rolf Bjarne Kvinge e53176383e
[builds] Remove the code to optionally inject an x64 slice into our binaries. (#10846)
It's been disabled for a while, which indicates that Apple has fixed the issue
on their side, and we don't need this code anymore.
2021-03-12 07:38:07 +01:00
mathieubourgeois 480d168287
Fix building Mono MacCatalyst sdk from source (#10824)
Currently, if building from source, we don't actually try to build the mac catalyst sdk, but we rely on its presence to do the install, which is problematic. Now package it like we do for ios & mac packages. Also adapted MacCatalyst assembly fix to work if we build from source instead of supposing we work from a downloaded package.
2021-03-10 22:51:35 +01:00
Rolf Bjarne Kvinge bf7c3268bc
[dotnet] Use the reference assemblies from the .NET 6 version we're referencing. (#10813) 2021-03-09 14:57:56 +01:00
Rolf Bjarne Kvinge f06e4a2e06
[builds] We have mac catalyst packs now. (#10766) 2021-03-03 17:55:46 +01:00
Rolf Bjarne Kvinge e84984a883
[builds] Remove debug code. (#10670) 2021-02-22 08:20:35 +01:00
Rolf Bjarne Kvinge 946f92dca6
[builds] Download the runtime packs for our platforms. (#10671)
These will soon be used to build a .NET version of libxamarin (we need the
dylibs shipped with the runtime packs to link libxamarin.dylib).

We also write out the version of the runtime packs
(BundledNETCorePlatformsPackageVersion) so that we can use the version later
in our Makefiles.
2021-02-22 08:16:41 +01:00
Rolf Bjarne Kvinge f127e614c9
[dotnet] Templateify some build logic. (#10618)
* [dotnet-linker] Templateify the install logic.

* [builds] Templateify the Versions.plist install logic.

* [dotnet] Create a per-platform Versions.props file with only the values applicable to that platform.

Also move the definition of the default TargetPlatformVersion to Make.versions, where we have other versions.

* [dotnet] Templateify some build code.
2021-02-11 20:17:12 +01:00
Rolf Bjarne Kvinge 28791b6e2a
[builds] Create the cache directory if needed. (#10372) 2021-01-11 16:25:56 +01:00
Rolf Bjarne Kvinge 15a2ebc2b7 [builds] Add a tool that fixes Mac Catalyst BCL assemblies.
The BCL assemblies we're using for Mac Catalyst for now are the ones built for Xamarin.iOS.
So we need to fix: InternalsVisibleToAttribute (to point to Xamarin.MacCatalyst.dll)
and references to Xamarin.iOS.dll
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 42687be5d5 [tools] OS Versions are messy in Mac Catalyst 😡
In some places we have to provide the macOS version, and in other places the
iOS version. Add a map and the corresponding code to convert between the two,
and use them when needed.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 14f89da787 [builds] Install the Mac Catalyst BCL assemblies 2020-12-03 10:42:25 +01:00
Rolf Bjarne Kvinge 0a2d8f3e5f [builds] Install the catalyst libraries from the mono archive 2020-12-03 10:42:25 +01:00
Rolf Bjarne Kvinge 03e010c747 Bump mono to a version that ships catalyst binaries and download those binaries.
New commits in mono/mono:

* mono/mono@dfbfe5eed1 [2020-02] Build makefile to support Mac Catalyst (#20566)

Diff: ac596375c7..dfbfe5eed1
2020-12-03 10:42:25 +01:00
Rolf Bjarne Kvinge c640775699 [dotnet] Bump to .NET 6.0.100-alpha.1.20556.2. and net6.0
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@f8768d9 Advance into the world of net6.0

Diff: 9abe69e6f5..f8768d99ef
2020-11-10 11:41:06 +01:00
Rolf Bjarne Kvinge f8b66658c5
[build] Implement support for optionally cache downloads in ~/Library/Caches/xamarin-macios. (#9894)
Set the MACIOS_CACHE_DOWNLOADS environment variable in ~/.zshrc, and enjoy
faster builds! Until your hard disk fills up...
2020-10-19 10:50:27 +02:00
Rolf Bjarne Kvinge d825679d20
[system-dependencies] Only use the locally installed .NET version. (#9885)
* [system-dependencies] Only use the locally installed .NET version.

We'll soon need to install files into the dotnet directory, and we don't want
to do that to the system dotnet. So just always use a locally installed .NET.

* Rework to not treat .NET 5 as an optional/installable dependency, instead download it always (like the mono archive).

This way no manual action is necessary to get it when needed, it will be
downloaded automatically.
2020-10-16 08:23:22 +02:00
Rolf Bjarne Kvinge 39e3184f02
[src] Build the .NET version of our product assemblies using a .NET 5 BCL. (#9637)
* [src] Build the .NET version of our product assemblies using a .NET 5 BCL.

We're not shipping the .NET product assemblies in any stable release, so we
can use a preview version of the .NET 5 BCL.

Also:

* Add all the nuget feeds we need to the top-level NuGet.config, even for .NET
  5/6, there shouldn't be any conflicts with stable feeds since we use exact
  version numbers.

* Generate a top-level global5.json which is copied to every directory that
  needs a .NET 5 global.json (overriding the .NET 3.1 global.json in the root
  directory).

* Use the expected dotnet binary during our local build.

* [tests] Fix the bgen tests to use .NET 5.

* [xharness] Set the current directory to the project directory when running .NET tests.

This way we end up using the dotnet version that's configured in global.json for the tests.
2020-09-21 13:22:44 +02:00
Rolf Bjarne Kvinge 4add0c9f47
A few minor improvements to speed up rebuilds. (#8597)
* There's no need to check the system when running 'make install', we already
  checked it during 'make all'.
* Remove the 'download-mono' dependency for the .stamp-download-mono target,
  since that makes the .stamp-download-mono target always out of date (since
  there will never be a 'download-mono' file). Instead execute the
  'download-mono' target manually. This fixes an issue where running 'make
  all' repeatedly would continue doing the same stuff over and over again.
2020-05-14 16:45:23 +02:00
Rolf Bjarne Kvinge 5834572741
Create and publish .NET NuGet packages. (#8576)
Create the various NuGet packages to support .NET 5+. The packages are
currently empty (and not very useful), but the actual content will come later.

The current set of NuGet packages are (this list is duplicated for each
platform: iOS, tvOS, watchOS and macOS):

* Microsoft.iOS.Sdk: currently contains the basic MSBuild targets files for an
  MSBuild Project SDK. Will eventually contain all the build logic. Might also
  eventually contain other tools (mlaunch, bgen, etc.), but these might also
  end up in a different package.
* Microsoft.iOS.Ref: will contain the Xamarin.iOS.dll reference assembly.
* Microsoft.iOS.Runtime.[RID]: will contain architecture-specific files
  (libxamarin*.dylib, the Xamarin.iOS.dll implementation assembly, etc.):

The NuGets built on CI are automatically published to a NuGet feed.

The versioning for the NuGet packages required a few changes: OS bumps are now
changed in Make.versions instead of Make.config (this is explained in the
files themselves as well).
2020-05-13 15:23:29 +02:00
Rolf Bjarne Kvinge 5f786dead4
[builds] Fix generation of the smcs script. (#8581)
This regressed in c517281f1c.
2020-05-13 08:49:26 +02:00
Rolf Bjarne Kvinge e4f8460277
[mmp/mtouch] Share more code. (#8394)
* Rearrange files in Xamarin.Mac a bit to ease code sharing between mmp and
  mtouch, by putting mono's static and dynamic libraries in
  /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Sdks/Xamarin.macOS.sdk
  to match how Xamarin.iOS does it.

* Don't use 'usr' as an intermediate directory. This removes another special
  case.

* Share many of the functions and properties that return specific directories,
  and document (as comments) what each function/property is supposed to
  return.
2020-04-16 14:19:45 +02:00
Alex Soto 3ff3e07ebe Merge remote-tracking branch 'xamarin/d16-5-xcode11.4' 2020-03-26 19:59:14 -04:00
Rolf Bjarne Kvinge eef4ea79c9 [builds] Download the netcore 3.1 assemblies to use as reference assemblies for .NET 5.
I couldn't figure out how to make nuget install these into the system, so I
decided to just download the package locally instead.

This is just temporary until we get real .NET 5 reference assemblies.
2020-03-09 18:43:41 +01:00
Alex Soto 709a90599e Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4-merge 2020-03-03 10:57:24 -05:00
Rolf Bjarne Kvinge feb5e96c2a
Rename bmac-mobile-mono to mono-sgen. (#7966)
bmac-mobile-mono is an old name (when we needed a specific executable to
execute bmac) that has nothing to do with its current usage (AOT code for
Xamarin.Mac apps).

So rename the executable to reflect current usage.

This makes looking at the installed files a bit less confusing.
2020-02-25 06:51:12 +01:00
Rolf Bjarne Kvinge c53b17d79b
Make the x86-64 slice we inject into binaries optional. (#7891)
We inject an x86-64 slice into binaries that don't contain one, because
Apple's notarization process fails without such a slice.

But make the slice optional and opt-in, because it seems Apple has started
to fail on binaries with such a slice now...
2020-02-14 14:25:43 +01:00
Rolf Bjarne Kvinge c517281f1c
Make the smcs script obsolete, and don't use it in tests anymore. (#7878)
Don't remove the entire script, because I believe there's code out there that
checks for the existence of the smcs script to determine whether Xamarin.iOS
is installed or not.
2020-02-13 08:37:52 +01:00
Rolf Bjarne Kvinge 999ba8e278
[builds] Make sure downloaded files have a newer timestamp than any other file from previous builds. (#7833)
This makes sure we actually use the new files we downloaded.
2020-02-10 22:30:52 +01:00
monojenkins b85e70fa66 [d16-5] [Mtouch] Make sure that the given SDK version and the iOS version do match. (#7736)
* [Mtouch] Make sure that the given SDK version and the iOS version do match.

We need to make sure that the iOS SDK and the iOS version do match the
ones present in Xcode.

* Add new variables to track the target version.
* Add method to get the target version.
* Modify mtouch to check agains the target framework rather than the
SDK.

This will allow to keep track of three independent things:

1. The SDK max version.
2. The Simulator max version.
3. The target version of the device.

This had to be added becuase 13.2 has targets to 13.2 but simulators for
13.3

Fixes: https://github.com/xamarin/xamarin-macios/issues/7705
2020-01-23 12:56:23 -05:00
Manuel de la Pena 8d83ec2bca
[Mtouch] Make sure that the given SDK version and the iOS version do match. (#7717)
We need to make sure that the iOS SDK and the iOS version do match the
ones present in Xcode.

* Add new variables to track the target version.
* Add method to get the target version.
* Modify mtouch to check agains the target framework rather than the
SDK.

This will allow to keep track of three independent things:

1. The SDK max version.
2. The Simulator max version.
3. The target version of the device.

This had to be added becuase 13.2 has targets to 13.2 but simulators for
13.3

Fixes: https://github.com/xamarin/xamarin-macios/issues/7705
2020-01-22 10:57:27 -05:00
Vincent Dondain fd3f86d912 Bump to mono:2019-10 (#7192) (#7547)
* Fixed
`/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker.Steps/OutputStep.cs(110,15): error CS0246: The type or namespace name ‘OutputException’ could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/mmp.csproj]`
* Changed the name of the method that is used from linker. Because of this commit 6be26771b9
* Added `OutputException.cs` file on `mtouch.csproj`.
* Removing enter_gc_safe and exit_gc_safe because now it's already gc_safe in this part of code, after a mono change.
* Added known exceptions to LLVM exception list.
* Needs `ifdef` because of this https://github.com/mono/mono/pull/17260.
* Bump MIN_MONO_VERSION to 6.8.0.41 and point MIN_MONO_URL to the PR.
* Add ENABLE_IOS=1 and ENABLE_MAC=1.
* Added switch to disable packaged mono build
* [Tests] Ignore tests that fail on 32b.
    Ignore the test on 32b, and filled issue: https://github.com/mono/mono/issues/17752
* [Tests] Ignore a couple of tests causing OOM.
    Hopefully fixes https://github.com/xamarin/maccore/issues/1659 for good.
* Ignore `MM0135` test on Catalina+ because it needs Xcode 9.4.
* [monotouch-test] Add null checks for teardown when test didn't run because of a too early OS version.
* [CFNetwork]: Http 2.0 requires OS X 10.11 or later.
    Check whether `_HTTPVersion2_0` is available and fallback to HTTP 1.1 otherwise.

* #7346
* This bumps Mono to use https://github.com/mono/mono/pull/17645 (which is the 2019-10 backport
of https://github.com/mono/mono/pull/17628).
* The big user-visible change is in regards to certificate validation, everything below are just
some minor adjustments to tests.

CoreFX uses a completely new `HttpClientHandler` implementation called `SocketsHttpHandler`,
which you can find at https://github.com/dotnet/corefx/tree/release/3.0/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler.

Since this is not based on the web stack anymore, it does not use any of the related APIs such
as `ServicePointManager` or `WebException`.

There is a new API called `HttpClientHandler.ServerCertificateCustomValidationCallback`.
- https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=netframework-4.8
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs (L154)
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Windows.cs (L383)

The `ServicePointManager.ServerCertificateValidationCallback` is no longer invoked and on
certificate validation failure, `AuthenticationException` (from `System.Security.Authentication`)
is thrown instead of `WebException`.

At the moment, the `NSUrlSessionHandler` still uses it's own validation callback and also still
throws `WebException` on failure; we should probably look into making this consistent with the
other handlers.

* `HttpContent.SerializeToStreamAsync()` is now `protected` (changed from `protected internal`).
  - src/Foundation/NSUrlSessionHandler.cs: changed overload accordingly.
  - src/System.Net.Http/CFContentStream.cs: likewise.

* `HttpHeaders.GetKnownHeaderKind()` is an internal Mono API.
   There is a new internal API called `System.Net.Http.PlatformHelper.IsContentHeader(key)`
   which exists in both the old as well as the new implementation.
   The correct way of doing it with the CoreFX handler is
   `HeaderDescriptor.TryGet (key, out var descriptor) && descriptor.HeaderType == HttpHeaderType.Content`

* `HttpClientHandler.MaxRequestContentBufferSize` is now longer supported, you can set it to
  any non-negative value, the getter will always return 0.
  See c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Core.cs (L18).
  - tests/linker/ios/link sdk/HttpClientHandlerTest.cs: removed assertion from test.

* `HttpMessageInvoker.handler` is a `protected private` field - in the CoreFX handler, it is
  called `_handler` and `private`.  This is accessed via reflection by some of the tests, which are
  now using the new name.
  - tests/mmptest/src/MMPTest.cs: here
  - tests/mtouch/MTouch.cs: here

* tests/monotouch-test/System.Net.Http/MessageHandlers.cs:
  Adjust `RejectSslCertificatesServicePointManager` to reflect the certificate validation
  changes described above.
  - FIXME: There was an `Assert.Ignore()` related to `NSUrlSessionHandler` and macOS 10.10;
    I removed that to reenable the test because the description linked to an old issue in
    the private repo that was referenced by several "Merged" PR's, so it looked to me that
    this might have already been fixed - and I also didn't see why it would fail there.
2019-12-18 11:40:47 -05:00
Alexander Köplinger 7bc1903f80 Bump mono to latest 2019-10 (#7574)
New commits in mono/mono:

* mono/mono@9bcfa60312 [2019-10] Bump msbuild to track mono-2019-10 (#18132)
* mono/mono@e6cd9a15cd [2019-10] [mini] Fix delegate trampoline virtual call via delgate Invoke (#18115)
* mono/mono@7c95e4bc48 [debugger] skip suspend for unattached threads (#18111)
* mono/mono@77147e7526 [2019-10] Bump msbuild+roslyn to track mono-2019-10 (#18093)
* mono/mono@d7337e5beb Bump to mono/corefx@f3815a9 (#18104)
* mono/mono@6ac11972db [2019-10] [threads] Add back mono_threads_attach_tools_thread as a public API (#18075)
* mono/mono@b687667619 Bump corefx to pick up https://github.com/mono/corefx/pull/370 (#18068)
* mono/mono@da605d8081 Remove DNS lookups of the local hostname in tests (#18059)
* mono/mono@a6e867fe96 Bump msbuild to track mono-2019-10 (#18045)
* mono/mono@3387bd4a26 Bump bockbuild to get https://github.com/mono/bockbuild/pull/136
* mono/mono@5dd74a60e8 Fix side effect.
* mono/mono@a36f07c803 Fix DIM in a generic interface. Fixes #17869
* mono/mono@08e5a9751a Bump msbuild to track mono-2019-10 (#18014)
* mono/mono@56a583ea5c [2019-10] [profiler] disable inlining when coverage profiler is used and fix allocation sizes (#17991)
* mono/mono@914ffea421 [sgen] Don't trigger collections during allocation of thread objects (#17997)

Diff: 18920a83f4..9bcfa60312
2019-12-13 11:59:16 -05:00
Jo Shields 5d4ada34c7 Bump to mono:2019-10 (#7192)
## Miscellaneous fixes

* Fixed
`/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker.Steps/OutputStep.cs(110,15): error CS0246: The type or namespace name ‘OutputException’ could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/mmp.csproj]`
* Changed the name of the method that is used from linker. Because of this commit 6be26771b9
* Added `OutputException.cs` file on `mtouch.csproj`.
* Removing enter_gc_safe and exit_gc_safe because now it's already gc_safe in this part of code, after a mono change.
* Added known exceptions to LLVM exception list.
* Needs `ifdef` because of this https://github.com/mono/mono/pull/17260.
* Bump MIN_MONO_VERSION to 6.8.0.41 and point MIN_MONO_URL to the PR.
* Add ENABLE_IOS=1 and ENABLE_MAC=1.
* Added switch to disable packaged mono build
* [Tests] Ignore tests that fail on 32b.
    Ignore the test on 32b, and filled issue: https://github.com/mono/mono/issues/17752
* [Tests] Ignore a couple of tests causing OOM.
    Hopefully fixes https://github.com/xamarin/maccore/issues/1659 for good.
* Ignore `MM0135` test on Catalina+ because it needs Xcode 9.4.
* [monotouch-test] Add null checks for teardown when test didn't run because of a too early OS version.
* [CFNetwork]: Http 2.0 requires OS X 10.11 or later.
    Check whether `_HTTPVersion2_0` is available and fallback to HTTP 1.1 otherwise.

## Bring HttpClient from CoreFX

* #7346 
* This bumps Mono to use https://github.com/mono/mono/pull/17645 (which is the 2019-10 backport
of https://github.com/mono/mono/pull/17628).
* The big user-visible change is in regards to certificate validation, everything below are just
some minor adjustments to tests.

### SocketsHttpHandler

CoreFX uses a completely new `HttpClientHandler` implementation called `SocketsHttpHandler`,
which you can find at https://github.com/dotnet/corefx/tree/release/3.0/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler.

Since this is not based on the web stack anymore, it does not use any of the related APIs such
as `ServicePointManager` or `WebException`.

### Certificate Validation Changes

There is a new API called `HttpClientHandler.ServerCertificateCustomValidationCallback`.
- https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=netframework-4.8
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs (L154)
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Windows.cs (L383)

The `ServicePointManager.ServerCertificateValidationCallback` is no longer invoked and on
certificate validation failure, `AuthenticationException` (from `System.Security.Authentication`)
is thrown instead of `WebException`.

At the moment, the `NSUrlSessionHandler` still uses it's own validation callback and also still
throws `WebException` on failure; we should probably look into making this consistent with the
other handlers.

### Minor adjustments related to internal Mono APIs

* `HttpContent.SerializeToStreamAsync()` is now `protected` (changed from `protected internal`).
  - src/Foundation/NSUrlSessionHandler.cs: changed overload accordingly.
  - src/System.Net.Http/CFContentStream.cs: likewise.

* `HttpHeaders.GetKnownHeaderKind()` is an internal Mono API.
   There is a new internal API called `System.Net.Http.PlatformHelper.IsContentHeader(key)`
   which exists in both the old as well as the new implementation.
   The correct way of doing it with the CoreFX handler is
   `HeaderDescriptor.TryGet (key, out var descriptor) && descriptor.HeaderType == HttpHeaderType.Content`

### Minor adjustments to tests.

* `HttpClientHandler.MaxRequestContentBufferSize` is now longer supported, you can set it to
  any non-negative value, the getter will always return 0.
  See c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Core.cs (L18).
  - tests/linker/ios/link sdk/HttpClientHandlerTest.cs: removed assertion from test.

* `HttpMessageInvoker.handler` is a `protected private` field - in the CoreFX handler, it is
  called `_handler` and `private`.  This is accessed via reflection by some of the tests, which are
  now using the new name.
  - tests/mmptest/src/MMPTest.cs: here
  - tests/mtouch/MTouch.cs: here

* tests/monotouch-test/System.Net.Http/MessageHandlers.cs:
  Adjust `RejectSslCertificatesServicePointManager` to reflect the certificate validation
  changes described above.
  - FIXME: There was an `Assert.Ignore()` related to `NSUrlSessionHandler` and macOS 10.10;
    I removed that to reenable the test because the description linked to an old issue in
    the private repo that was referenced by several "Merged" PR's, so it looked to me that
    this might have already been fixed - and I also didn't see why it would fail there.
2019-12-04 15:10:32 -05:00
Bernhard Urban-Forster d5ff125555 [build] fix Makefile around x86-64-slice (#7219)
* [build] fix Makefile around x86-64-slice

a7fd4552dc was slightly wrong, it should have broken all tests around notarization (which are presumably not done for PRs).

Also adding a missing dependency.

* typo

* $(suffix $@) does not work when specified as dependency

* update .gitignore

* Update builds/Makefile

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-10-15 08:16:24 +02:00
Bernhard Urban-Forster a7fd4552dc [build] lipo x86-64-slice into libs according to their kind (#7217)
The result of `lipo`ing `.a`s and `.dylib`s together is not well defined.
In this specific case, using `lipo` on `libmonosgen-2.0.a` to inject `x86-64-slice.dylib` resulted into `dsymutil` (run by `mtouch` when building the app) not finding the proper debug information anymore.

Also putting the dummy slice into a file and adding `-ggdb3` to avoid those warnings:

```console
$ dsymutil ./_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.dylib
warning: (x86_64) /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/--19c1b5.o unable to open object file: No such file or directory
warning: no debug symbols in executable (-arch x86_64)
```
2019-10-11 07:08:42 +02:00
monojenkins d45ad36c66 Bump mono to 2019-08@528103728fc2aedb7b6062e11255d39a0ed3f31c to add missing NS2.1 APIs (#7150)
See https://github.com/mono/mono/issues/17064.

The 2019-08 version of the fix adds a new assembly with NS2.1 APIs that we stubbed out in 2019-06: System.Data.DataSetExtensions.dll
2019-10-02 08:08:41 -04:00
Alexander Köplinger fb1f73ef57 Bump mono to 2019-08@528103728fc2aedb7b6062e11255d39a0ed3f31c to add missing NS2.1 APIs (#7147)
See https://github.com/mono/mono/issues/17064.

The 2019-08 version of the fix adds a new assembly with NS2.1 APIs that we stubbed out in 2019-06: System.Data.DataSetExtensions.dll
2019-10-02 07:59:39 -04:00
Bernhard Urban 26ec2826aa ARM64_32 Debug Mode (#7012)
* [builds] add arm64_32 cross compiler

* [mtouch] force --interpreter on arm64_32 debug mode build

* [mtouch] include debug check for arm64_32 and reflect error codes in documentation
2019-09-24 17:24:49 +02:00
Rolf Bjarne Kvinge 2adecee3d9
Drop the Xcode 9.4 dependency. (#7044)
* Drop the Xcode 9.4 dependency.

Also bump mono to get the removal of the mac32 binaries.

New commits in mono/mono:

* mono/mono@70d6903053 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900)
* mono/mono@4bff2b6370 [offsets-tool] Install clang into the user-specific python directory.
* mono/mono@81894ec8ca Implement WriteCore and ReadCore in DeflateStream
* mono/mono@bfbf823ca1 [ci] Remove more XCODE32_DIR usages (#16964)
* mono/mono@ce01b20a4d Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again
* mono/mono@7a587d7fa6 Add .NET 4.8 reference assemblies (#16912)
* mono/mono@35e454a8f6 [sdks] Remove the mac32 build. (#16936)
* mono/mono@75eb342f53 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926)
* mono/mono@5881981f79 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909)
* mono/mono@6290b6cd6e Temporarily disable embedded ppdb data decompression (#16911)
* mono/mono@a0e7f9eaf2 [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886)
* mono/mono@6275840a7f Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901)
* mono/mono@25f6093283 [corlib] Fix building nunit-lite twice (#16895)
* mono/mono@7ec17ba1be [2019-08] [android sdk] Add aprofutil tool (#16884)
* mono/mono@f755f3b539 [metadata] Fix leaks when handling a few attributes (#16850)
* mono/mono@5f9a2db39b [2019-08] Fix infrequent hangs in test-runner. (#16854)
* mono/mono@f31f5ea1f1 [2019-08] [threads] do not convert NULL thread name (#16828)
* mono/mono@20308e6f87 [aot] Do not wrap tool_prefix path when calling strip (#16820)
* mono/mono@cecda47c48 [aprofutil] Add -p and -f options
* mono/mono@824cc12ac3 Bump to mono/corefx@e79cf5b
* mono/mono@b77dc06a7e [aprofutil] Install the tool correctly (#16112)
* mono/mono@1848d78d60 [aotprof-tool] Initial import of AOT profiler tool (#15384)
* mono/mono@da0086e304 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756)
* mono/mono@0297b21b03 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768)
* mono/mono@40631e3b9e [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751)
* mono/mono@68b77674e2 Vtable [i] can be null so this should be check before use it. Fixes #16712
* mono/mono@4a0b4f41ed [mini] publish global patches after JitInfo has been added
* mono/mono@7a1f63fde6 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step.

Diff: 29b1ac19c9..70d6903053

* [tests] Add a fat macOS dylib for testing purposes.

Add a binary version of a fat macOS dylib (because we can't create one when we
need it since we can't create 32-bit slice anymore).

It was created like this (in tests/test-libraries):

	$ cat test.m
	int theUltimateAnswer ()
	{
		return 42;
	}

	$ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz  -arch i386
	$ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib

* [tests] Adjust XM tests to XM not having fat dylibs anymore.

* [tests] Adjust product tests to some libraries not being fat anymore.

* One more test fix.
2019-09-24 13:40:18 +02:00
Rolf Bjarne Kvinge f40261a502
[builds] Stop shipping the 32-bit AOT compiler for Xamarin.Mac. (#7039) 2019-09-20 15:39:39 +02:00
Rolf Bjarne Kvinge d1d620291a Don't build the XM and the XI toolchains at the same time, they're not parallel safe. Works around mono/mono#16821.
Ref: https://github.com/mono/mono/issues/16821
2019-09-16 15:26:47 +02:00