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

7149 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 445bf4be07
[registrar] Increase code sharing in generated `native_to_managed_trampoline_*` functions (#7221)
Several functions were 100% identical except for their signature. However
the signature were over-specialized and simplifying them allows the
(already) present code merge feature to achieve much better results.

Final size impact will vary based on the API used (both the managed and
native linker can remove some) but the more API you use the more likely
the application included duplicate code.

**Before**

`tools/mtouch/Xamarin.iOS.registrar.ios.x86_64.m` has `native_to_managed_trampoline_[1..379]`

```
find tools/ -name Xamarin.*.a | xargs ls -l
-rw-r--r--  1 poupou  staff  4143148 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.full.a
-rw-r--r--  1 poupou  staff  4139052 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.full.x86_64.a
-rw-r--r--  1 poupou  staff  4143160 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.mobile.a
-rw-r--r--  1 poupou  staff  4139064 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.mobile.x86_64.a
-rw-r--r--  1 poupou  staff  4521752 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.i386.a
-rw-r--r--  1 poupou  staff  9240416 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.simulator.a
-rw-r--r--  1 poupou  staff  4714336 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.x86_64.a
```

**After**

`tools/mtouch/Xamarin.iOS.registrar.ios.x86_64.m` has `native_to_managed_trampoline_[1..132]`

```
find tools/ -name Xamarin.*.a | xargs ls -l
-rw-r--r--  1 poupou  staff  3723012 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.full.a
-rw-r--r--  1 poupou  staff  3718916 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.full.x86_64.a
-rw-r--r--  1 poupou  staff  3723016 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.mobile.a
-rw-r--r--  1 poupou  staff  3718920 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.mobile.x86_64.a
-rw-r--r--  1 poupou  staff  3995520 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.i386.a
-rw-r--r--  1 poupou  staff  8195748 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.simulator.a
-rw-r--r--  1 poupou  staff  4193956 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.x86_64.a
```
2019-10-11 22:18:58 -04:00
Rolf Bjarne Kvinge 911d127335
Bump system mono to get fix for mono/mono#17151. (#7220)
mono/mono#17151 prevents xharness from running tests on Catalina, because
xharness thinks the root drive has no more space.
2019-10-11 20:08:59 +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
Rolf Bjarne Kvinge f8f7de004c
[tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.

Fixes https://github.com/xamarin/maccore/issues/2011.

* [tests] Fix typo test on macOS 10.15. Fixes #7116.

Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-10 08:35:38 +02:00
Manuel de la Pena 118fac4c2a
[Tests] Add the new test dll from mono to xharness. (#7188)
Following PR  https://github.com/xamarin/xamarin-macios/pull/7147 we
have a new dll and therefore new tests to run.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7148
2019-10-07 21:52:03 -04:00
Vũ Đức Tuyến fec41fa64a Fix #7174: ArgumentNullException for NSExpression.FromConstant (#7181)
* - Add missing NullAllowed attribute
- Add unit test for null value

* Normalize coding style
2019-10-07 14:09:17 +02:00
Alexander Köplinger 12831b3c36 Fix version numbers in FrameworkList.xml files (#7161)
The existing test only checked that an assembly was mentioned in the file, but not that its version etc matches.
Updated the test and fixed the differences.
2019-10-04 14:26:28 -04:00
Rolf Bjarne Kvinge bffca7df7b
[tests] Fix building the test libraries. (#7172)
Fix building the test libraries so that the native compiler gets passed the
right arguments (which makes us build the tvOS and watchOS versions of these
libraries with bitcode).

This fixes a build problem with the framework-test test for tvOS and watchOS.

Also remove an outdated comment.
2019-10-04 16:51:12 +02:00
Sebastien Pouliot 02b546ffc1
[registrar] Fix assignation of `value` to IsConstructor (#7167)
It does not look like an issue, at least today, since it's always set to
`false` but better fix it before it becomes an hard to debug issue

```
$ git grep "IsConstructor = "
src/ObjCRuntime/Registrar.cs:                                                           IsConstructor = false,
src/ObjCRuntime/Registrar.cs:                                                                   IsConstructor = false,
src/ObjCRuntime/Registrar.cs:                                                   IsConstructor = false,
```
2019-10-04 08:56:33 -04:00
Rolf Bjarne Kvinge 4e5a2a3fc2
Automatically build mono from source if any of the archives aren't available. (#7160)
* Automatically build mono from source if any of the archives aren't available.

* [jenkins] Show in the PR report if mono was built from source.

* [jenkins] Make sure we got everything after running configure.
2019-10-04 09:55:29 +02:00
Vincent Dondain 2600739f54
[bcl-tests] Ignore test that's running out of memory (#7137)
- First appeared here: https://github.com/xamarin/xamarin-macios/pull/7127#issuecomment-536688551
- Mono issue filed here: https://github.com/mono/mono/issues/17129
2019-10-03 18:21:23 -04:00
Rolf Bjarne Kvinge 8128976084
[runtime] Split the build differently: build libraries for simulator and device separately. (#7143)
This has a couple of advantages:

* It makes it easier to add a catalyst version of these libraries (because it
  becomes cumbersome to build for catalyst when the build rules assumes we're
  building for both simulator and device).
* It makes it easier to create an xcframework of our libraries, because the
  contents in an xcframework is split like this.
2019-10-03 16:38:44 +02:00
Sebastien Pouliot 82b84d0c8f
[linker] Ensure we can remove NSUrlSessionHandler if unused (#7151)
Moving `NSUrlSessionHandler` into the platform assemblies (e.g.
Xamarin.iOS.dll) instead of System.Net.Http.dll was not optimal as it
prevented the linker to remove it when the application did not use it.

This shows a lot in an "helloworld" type of application (see below)
but in real life most of the removed code gets used by something else
(and is included.

```
Directories / Files                                                              helloworld-d16-4.app helloworld-fixed.app         diff            %
./
        AppIcon60x60@2x.png                                                             2,632        2,632            0       0.00 %
        AppIcon76x76@2x~ipad.png                                                        3,125        3,125            0       0.00 %
        archived-expanded-entitlements.xcent                                              181          181            0       0.00 %
        Assets.car                                                                     75,688       75,688            0       0.00 %
        embedded.mobileprovision                                                        8,456        8,456            0       0.00 %
        helloworld                                                                  4,700,256    3,915,936     -784,320     -16.69 %
        helloworld.aotdata.arm64                                                        1,448        1,432          -16      -1.10 %
        helloworld.exe                                                                  6,144        6,144            0       0.00 %
        Info.plist                                                                      1,712        1,712            0       0.00 %
        mscorlib.aotdata.arm64                                                        406,080      364,104      -41,976     -10.34 %
        mscorlib.dll                                                                  561,664      501,760      -59,904     -10.67 %
        NOTICE                                                                            159          159            0       0.00 %
        PkgInfo                                                                             8            8            0       0.00 %
        System.aotdata.arm64                                                           17,008          936      -16,072     -94.50 %
        System.Core.aotdata.arm64                                                       2,432            0       -2,432    -100.00 %
        System.Core.dll                                                                 4,608            0       -4,608    -100.00 %
        System.dll                                                                     32,768        5,120      -27,648     -84.38 %
        System.Net.Http.aotdata.arm64                                                  31,648            0      -31,648    -100.00 %
        System.Net.Http.dll                                                            29,184            0      -29,184    -100.00 %
        Xamarin.iOS.aotdata.arm64                                                      62,544       33,464      -29,080     -46.50 %
        Xamarin.iOS.dll                                                                92,672       53,248      -39,424     -42.54 %
./_CodeSignature
        CodeResources                                                                   7,575        6,655         -920     -12.15 %
./LaunchScreen.storyboardc
        01J-lp-oVM-view-Ze5-6b-2t3.nib                                                  1,831        1,835            4       0.22 %
        Info.plist                                                                        258          258            0       0.00 %
        UIViewController-01J-lp-oVM.nib                                                   896          896            0       0.00 %
./Main.storyboardc
        BYZ-38-t0r-view-8bC-Xf-vdC.nib                                                  1,836        1,832           -4      -0.22 %
        Info.plist                                                                        258          258            0       0.00 %
        UIViewController-BYZ-38-t0r.nib                                                   916          916            0       0.00 %

Statistics

Native subtotal                                                                     4,700,256    3,915,936     -784,320     -16.69 %
    Executable                                                                      4,700,256    3,915,936     -784,320     -16.69 %
    AOT data *.aotdata                                                                      0            0            0          -

Managed *.dll/exe                                                                     727,040      566,272     -160,768     -22.11 %

TOTAL                                                                               6,053,987    4,986,755   -1,067,232     -17.63 %
```
2019-10-02 10:10:26 -04:00
Rolf Bjarne Kvinge 41c6fa029d
[monotouch-test] Fix UrlProtocolTest after a server we don't control changed its output. Fixes xamarin/maccore#2006. (#7154)
microsoft.com is doing user agent sniffing, and broke our our test since their
output is now different. Switch to example.com instead.

Fixes https://github.com/xamarin/maccore/issues/2006.
2019-10-02 15:59:31 +02: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
Sebastien Pouliot f5c39c8eb6
Bump versions after d16-4 branch (#7132) 2019-10-01 08:46:04 -04:00
Rolf Bjarne Kvinge 39c90b38fa Bump maccore. (#7142)
New commits in xamarin/maccore:

* xamarin/maccore@3e141c6779 [devops] Fix xcode11 provisioning (#2003)
* xamarin/maccore@86662c6050 Merge pull request #1999 from xamarin/swift-o-matic-doc-object-modeling
* xamarin/maccore@50822d35b3 Object Modeling documentation
* xamarin/maccore@f50226a11f Merge pull request #1998 from xamarin/swift-o-matic-doc-outline
* xamarin/maccore@d18f9ca2da functional outline documentation

Diff: 454248ba13..3e141c6779
2019-10-01 07:04:25 -04:00
Rolf Bjarne Kvinge ea829b5a3f [tests] Remove workaround for xamarin/maccore#1996.
Fixes https://github.com/xamarin/maccore/issues/1996.
2019-09-30 13:30:28 -04:00
Vincent Dondain 4ecb1b32b1 Bump mono 2019-08
This is to match Xamarin.Android

New commits in mono/mono:

* mono/mono@d8441deead [crashing] Remove Mono signal handlers when starting to handle a crash (#17078)
* mono/mono@7ae0f38fd7 [runtime] Respect runtime_version in mono_init_internal (#17086)
* mono/mono@61ca7fe3a4 [sdks] Bump min iOS version to 7.0. (#17070)

Diff: c99adb97ed..d8441deead
2019-09-30 13:30:28 -04:00
Difegue 36d9417f92 Fix the NSFileTypeForHFSTypeCode enum (#6676)
* Rework NSFileTypeForHFSTypeCode

* Start writing 4cc test

* Update NSWorkspace.cs

* Fix formatting issues

* Fix tests

* Update src/AppKit/Enums.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Update src/AppKit/NSWorkspace.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Reintroduce old NSFileTypeForHFSTypeCode

+ Fix tests style

* Invert XAMCORE_4_0 check

* Fix xtro (new API added)
2019-09-27 14:14:15 -04:00
Sebastien Pouliot 05af7ac183
[generator] Reduce code duplication in trampolines by introducing a new base type (#7118)
This saves 107kb (0.7%) in Xamarin.iOS.dll (managed code and metadata).
Release (AOT) size reduction will vary depending on how much the linker can remove.

```
-rwxr-xr-x  1 poupou  staff  15963136 26 Sep 10:16 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  12301824 26 Sep 10:16 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  17126912 26 Sep 10:16 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  8375296 26 Sep 10:13 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll
-rwxr-xr-x  1 poupou  staff  11671040 26 Sep 10:13 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.TVOS.dll
-rwxr-xr-x  1 poupou  staff  7321088 26 Sep 10:12 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.WatchOS.dll
-rwxr-xr-x  1 poupou  staff  5295104 26 Sep 10:12 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.WatchOS/Xamarin.WatchOS.dll
lrwxr-xr-x  1 poupou  staff  38 26 Sep 10:11 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/Xamarin.Mac/Xamarin.Mac.dll -> ../../reference/mobile/Xamarin.Mac.dll
lrwxr-xr-x  1 poupou  staff  36 26 Sep 10:11 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/4.5/Xamarin.Mac.dll -> ../../reference/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  21060096 26 Sep 10:16 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/reference/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  21063168 26 Sep 10:16 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/reference/mobile/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  21060096 26 Sep 10:16 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/x86_64/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  21063168 26 Sep 10:16 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/x86_64/mobile/Xamarin.Mac.dll
```

```
-rwxr-xr-x  1 poupou  staff  15853568 26 Sep 11:15 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  12244480 26 Sep 11:15 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  17017344 26 Sep 11:15 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll
-rwxr-xr-x  1 poupou  staff  8346624 26 Sep 11:13 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll
-rwxr-xr-x  1 poupou  staff  11615744 26 Sep 11:13 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.TVOS.dll
-rwxr-xr-x  1 poupou  staff  7267328 26 Sep 11:12 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.WatchOS.dll
-rwxr-xr-x  1 poupou  staff  5267456 26 Sep 11:12 _ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.WatchOS/Xamarin.WatchOS.dll
lrwxr-xr-x  1 poupou  staff  38 26 Sep 10:11 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/Xamarin.Mac/Xamarin.Mac.dll -> ../../reference/mobile/Xamarin.Mac.dll
lrwxr-xr-x  1 poupou  staff  36 26 Sep 10:11 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/4.5/Xamarin.Mac.dll -> ../../reference/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  20979712 26 Sep 11:15 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/reference/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  20983296 26 Sep 11:15 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/reference/mobile/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  20979712 26 Sep 11:15 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/x86_64/full/Xamarin.Mac.dll
-rwxr-xr-x  1 poupou  staff  20983296 26 Sep 11:15 _mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/x86_64/mobile/Xamarin.Mac.dll
```
2019-09-27 09:05:38 -04:00
Rolf Bjarne Kvinge 0418008046
[runtime] Use newer atomic functions. (#7119)
Fixes these warnings:

    shared.m:252:6: warning: 'OSAtomicDecrement32Barrier' is deprecated: first deprecated in watchOS 3.0 - Use std::atomic_fetch_sub() from <atomic> instead [-Wdeprecated-declarations]
            if (OSAtomicDecrement32Barrier (&bl->descriptor->ref_count) == 0) {
                ^
    /Applications/Xcode11.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.0.sdk/usr/include/libkern/OSAtomicDeprecated.h:201:9: note: 'OSAtomicDecrement32Barrier' has been explicitly marked deprecated here
    int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue );
            ^
    shared.m:270:2: warning: 'OSAtomicIncrement32' is deprecated: first deprecated in watchOS 3.0 - Use std::atomic_fetch_add_explicit(std::memory_order_relaxed) from <atomic> instead [-Wdeprecated-declarations]
            OSAtomicIncrement32 (&source->descriptor->ref_count);
            ^
    /Applications/Xcode11.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.0.sdk/usr/include/libkern/OSAtomicDeprecated.h:171:9: note: 'OSAtomicIncrement32' has been explicitly marked deprecated here
    int32_t OSAtomicIncrement32( volatile int32_t *__theValue );
            ^
    monotouch-debug.m:309:10: warning: 'OSAtomicIncrement32Barrier' is deprecated: first deprecated in watchOS 3.0 - Use std::atomic_fetch_add() from <atomic> instead [-Wdeprecated-declarations]
            int c = OSAtomicIncrement32Barrier (&http_send_counter);
                    ^
    /Applications/Xcode11.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.0.sdk/usr/include/libkern/OSAtomicDeprecated.h:182:9: note: 'OSAtomicIncrement32Barrier' has been explicitly marked deprecated here
    int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue );
            ^
2019-09-27 07:15:59 +02:00
Rolf Bjarne Kvinge 621d2e0331
Bump maccore to get mlaunch fix for lldb support. (#7114)
Diff for xamarin/maccore bump: 486ad67875..454248ba13
2019-09-26 18:36:00 +02:00
Alex Soto cd5917650e
[mono] Bump mono to match android (#7104)
* [mono] Bump mono to match android

4546440471...c99adb97ed

* [tests] Add workaround for xamarin/maccore#1996.
2019-09-26 08:39:49 -04:00
Rolf Bjarne Kvinge 46fbc833d7
Use the mono archive again. (#7096) 2019-09-25 17:35:11 +02:00
Rolf Bjarne Kvinge 1e92a732ef
[mtouch] Tweak watchOS architecture test to build for bitcode when building with llvm. Fixes xamarin/maccore#1994. (#7097)
Tweak the watchOS architecture test to build for bitcode when building with
llvm, since that's what's usually done.

Also tweak the MT0145 error message a bit.

Fixes https://github.com/xamarin/maccore/issues/1994.
2019-09-25 17:06:27 +02:00
Vincent Dondain d4aae746dd [mono] bump mono/2019-08 (#7088)
New commits in mono/mono:

* mono/mono@4546440471 Add mono-hang-watchdog.in to tarball (#17018)
* mono/mono@4c31bdabf3 [2019-08] [debugger] New way to filter exceptions to support VSWin features (#17000)
* mono/mono@d73a286a2c [ci] Make ios/mac sdks archive URL more predictable
* mono/mono@dacef517fa [merp] Use function names even in 'private crashes' mode (#17003)
* mono/mono@d1ca1a5d2e [2019-08] [System.Xml] Fix deserialization issue (#17014)
* mono/mono@1d55b355f3 Correctly check for HAVE_STAT_BIRTHTIME in configure.ac checks for System.Native (#17001)
* mono/mono@bb522edb0d [2019-08] Restore Previous ExecutionContext Capture Behavior (#16997)
* mono/mono@7f7b5c9f3e [interp] avoid exception checkpoint when in thread is in GC Safe state (#16967)
* mono/mono@c87f99dd81 [ci] Fix typo in sdks-archive.groovy
* mono/mono@065499c2ef [ci] Fix typo in sdks-archive.groovy
* mono/mono@9f7b2c8d0a [ci] Fix typo in sdks-archive.groovy
* mono/mono@2c003ec71d [ci] Build iOS/Mac Mono sdks archive using Xcode 11
* mono/mono@e02e823ef7 [arm64_32] fix pointer size in CallInfo

Diff: 70d6903053..4546440471
2019-09-25 11:07:24 +02:00
monojenkins abfa32c09f [master] [generator] Do not generate PlatformNotSupportedException in chaining .ctor (#7092)
Types that are new in 64bits only OS are generated differently on 32bits
bindings. They mainly throw a `PlatformNotSupportedException` so it's
easier to diagnose (than a crash) what's happening at runtime.

This works well in all cases except one. When a new type, let's say
`UIMenuElement` is added **and** serves as a new base type for existing
types.

`UIKeyCommand` (iOS 7) -> `UICommand` (iOS 13)-> `UIMenuElement` (iOS 13)

This is _correct_ as new base types can be added (in ObjC and C#).
However the generated code for the constructors of `UICommand` and
`UIMenuElement` would be throwing a `PlatformNotSupportedException`
which breaks the `UIKeyCommand` on 32 bits devices.

We fixed this in a few places by tweaking the availability attribute
but that requires spotting the new base type while doing bindings and
that is error prone [1][2].

This PR simply does let the `protected` constructor, using when chaining,
be generated normally. It's simpler and will cover all the cases (without
requiring hacks in the availability of those types)

[1] https://github.com/xamarin/xamarin-macios/issues/7083
[2] https://github.com/xamarin/xamarin-macios/issues/7084
2019-09-24 21:12:59 -04:00
Vincent Dondain 601f86abd1
Bump Touch.Unit (dark mode support) (#7021)
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@d22825a [TouchRunner] Fix colors for iOS 13 dark mode (#53)

Diff: de42aa3a64..d22825a7d1
2019-09-24 16:33:20 -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
Sebastien Pouliot 80e6e63f87
[generator] Fix BI0000 from FormatException when no arguments are provided for an error (#7078)
Add new overloads so we can skip `String.Format` calls when relaying
messages without any arguments. Solve cases like

```
error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.FormatException: Input string was not in a correct format.
  at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000b2] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Text/StringBuilder.cs:1445
...
```

because we failed compilation due to an (hidden) syntax error like:

```
foundation.cs(3627,3): error CS1519: Invalid token '{' in class, struct, or interface member declaration
```

where the `{` character is causing the `FormatException` inside the
generator sources.

This is now more properly reported as

```
error BI0002: bgen: Could not compile the API bindings.
	foundation.cs(3627,3): error CS1519: Invalid token '{' in class, struct, or interface member declaration
```
2019-09-24 09:08:05 -04: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
Bernhard Urban 62466d4c46 [monotouch-tests] reduce amount of test objects to avoid out of memory (#7075)
I get this otherwise on the watch4 in debug mode (with interp):

```
Process 1255 stopped
* thread #1, name = 'tid_303', queue = 'com.apple.main-thread', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=80 MB, unused=0x0)
    frame #0: 0x1e185ae8 CoreGraphics`x_malloc + 44
CoreGraphics`x_malloc:
->  0x1e185ae8 <+44>: str    w19, [x0], #0x10
    0x1e185aec <+48>: ldp    x29, x30, [sp, #0x10]
    0x1e185af0 <+52>: ldp    x20, x19, [sp], #0x20
    0x1e185af4 <+56>: ret
Target 0: (monotouchtest) stopped.
```
2019-09-24 13:29:56 +02:00
Bernhard Urban 04a4c3f2ce
[coop runtime] add a GC transition and relax some GC related assertions (#7036)
* [coop] add missing gc_unsafe transition

    frame #3: 0x02a39fd4 monotouchtest`log_callback(log_domain=0x00000000, log_level="error", message="../../../../../mono/metadata/object.c:1905: Expected GC Unsafe mode but was in STATE_BLOCKING state", fatal=4, user_data=0x00000000) at runtime.m:1251:3
    frame #4: 0x02a03f78 monotouchtest`monoeg_g_logv_nofree(log_domain=0x00000000, log_level=G_LOG_LEVEL_ERROR, format=<unavailable>, args=<unavailable>) at goutput.c:149:2 [opt]
    frame #5: 0x02a03f14 monotouchtest`monoeg_g_logv(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>, args=<unavailable>) at goutput.c:156:10 [opt]
    frame #6: 0x02a03fa8 monotouchtest`monoeg_g_log(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>) at goutput.c:165:2 [opt]
    frame #7: 0x029e54f8 monotouchtest`assert_gc_unsafe_mode(file="../../../../../mono/metadata/object.c", lineno=1905) at checked-build.c:396:3 [opt]
    frame #8: 0x0294ef98 monotouchtest`mono_class_vtable_checked(domain=0x16d87b70, klass=0x17bfab98, error=0x19498a08) at object.c:1905:2 [opt]
    frame #9: 0x0298f0dc monotouchtest`get_current_thread_ptr_for_domain(domain=0x16d87b70, thread=0x03f645d0) at threads.c:635:2 [opt]
    frame #10: 0x0298d9dc monotouchtest`mono_thread_current at threads.c:2026:23 [opt]
    frame #11: 0x02992a80 monotouchtest`mono_runtime_set_pending_exception(exc=0x0357e4a0, overwrite=0) at threads.c:5176:23 [opt]
    frame #12: 0x02a3c650 monotouchtest`::xamarin_process_nsexception_using_mode(ns_exception=name: "System.ApplicationException" - reason: "3,14", throwManagedAsDefault=false) at runtime.m:2369:4
    frame #13: 0x02a3c478 monotouchtest`::xamarin_process_nsexception(ns_exception=name: "System.ApplicationException" - reason: "3,14") at runtime.m:2336:2
    frame #14: 0x0270b488 monotouchtest`::xamarin_pinvoke_wrapper_objc_msgSendSuper18(__p__0=0x0357d0f0, __p__1=0x02ad1ef2) at pinvokes.m:5732:4
    frame #15: 0x02a64764 monotouchtest`do_icall(frame=<unavailable>, sig=0x17d70bf0, op=<unavailable>, sp=0x19498fa0, ptr=<unavailable>, save_last_error=0) at interp.c:1947:3 [opt]
    frame #16: 0x02a632b8 monotouchtest`do_icall_wrapper(frame=0x194991b0, sig=0x17d70bf0, op=547, sp=0x19498fb0, ptr=0x0270b408, save_last_error=0) at interp.c:2037:7 [opt]
    Messaging::void_objc_msgSendSuper @ 396160394 "calli.nat.fast" || frame #17: 0x02a51d5c monotouchtest`interp_exec_method_full(frame=0x194991b0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3229:9 [opt]
    ObjCExceptionTest::InvokeManagedExceptionThrower @ 396160296 "vcall" || frame #18: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x19499370, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    ExceptionsTest::ManagedExceptionPassthrough @ 396150902 "vcallvirt.fast" || frame #19: 0x02a521cc monotouchtest`interp_exec_method_full(frame=0x194994d0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3325:4 [opt]
    Object::runtime_invoke_direct_void__this__ @ 401347822 "vcall" || frame #20: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x19499588, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    frame #21: 0x02a506f8 monotouchtest`interp_runtime_invoke(method=<unavailable>, obj=0x0357c4f0, params=0x00000000, exc=0x1949965c, error=0x194998b8) at interp.c:1766:2 [opt]
    frame #22: 0x028a739c monotouchtest`mono_jit_runtime_invoke(method=0x17534858, obj=<unavailable>, params=0x00000000, exc=<unavailable>, error=0x194998b8) at mini-runtime.c:3170:12 [opt]
    frame #23: 0x02951cfc monotouchtest`do_runtime_invoke(method=0x17534858, obj=0x0357c4f0, params=0x00000000, exc=0x00000000, error=0x194998b8) at object.c:3017:11 [opt]
    frame #24: 0x0294e6d4 monotouchtest`mono_runtime_invoke_checked(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=<unavailable>) at class-getters.h:24:1 [opt] [artificial]
    frame #25: 0x02955408 monotouchtest`mono_runtime_try_invoke_array(method=0x17534858, obj=0x0357c4f0, params=0x00000000, exc=0x00000000, error=0x194998b8) at object.c:5564:10 [opt]
    frame #26: 0x02905fac monotouchtest`ves_icall_InternalInvoke(method=<unavailable>, this_arg=<unavailable>, params=0x00000000, exc=0x19499f0c) at icall.c:3753:8 [opt]
    frame #27: 0x02a64788 monotouchtest`do_icall(frame=<unavailable>, sig=0x17496978, op=<unavailable>, sp=0x19499d88, ptr=<unavailable>, save_last_error=0) at interp.c:1982:20 [opt]
    frame #28: 0x02a632b8 monotouchtest`do_icall_wrapper(frame=0x19499fb0, sig=0x17496978, op=552, sp=0x19499da0, ptr=0x02905bec, save_last_error=0) at interp.c:2037:7 [opt]
    RuntimeMethodInfo::InternalInvoke @ 400702536 "calli.nat.fast" || frame #29: 0x02a51d5c monotouchtest`interp_exec_method_full(frame=0x19499fb0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3229:9 [opt]
    RuntimeMethodInfo::Invoke @ 400701852 "call" || frame #30: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x1949a110, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    MethodBase::Invoke @ 400700872 "callvirt.fast" || frame #31: 0x02a521cc monotouchtest`interp_exec_method_full(frame=0x1949a280, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3325:4 [opt]

* [coop] relax a couple GC state assertions

* [coop] update doc for enabling GC assertions

* [coop] relax a GC assertion in release trampoline
2019-09-23 22:08:25 +02:00
Vincent Dondain c54ddd4091
Use Xcode 11 final (#7072)
It's the same hash as Xcode 11 GM 2 but it's cleaner to actually use `Xcode11.app`.

In addition: the device bots are looking for "GM" and "beta" in the Xcode name to run on either the stable or beta pool.
2019-09-23 15:46:00 -04:00
monojenkins e8a79fcebd Don't build mono from source when we're running device tests. (#7043)
Because we're using a pre-built package and not building anything at all.

This makes xharness less confused about what it should do.
2019-09-23 16:40:40 +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
Waleed Chaudhry 1dc3beabfa
[Generator] Provide clear error message on type mismatch with BindAs error (#7016)
* [Generator] Provide clear error message on type mismatch with BindAs attribute that results in  generator crashing. Fixes 6863.
2019-09-19 21:05:22 -04:00
Sebastien Pouliot ba3acd709b
Add SECURITY.MD to repo (as suggested by OSPO) (#7019) 2019-09-19 17:44:22 -04:00
Vincent Dondain 85b194e12c
[Versions] .3 is for xcode11.1, so use .5 (#7025)
* [Versions] .3 is for xcode11.1, so use .5

* Use .7 because .5 is reserved for a possible Xcode 11.2
2019-09-19 17:27:04 -04:00
Rolf Bjarne Kvinge 7fc8db2fca
[xharness] Fix incorrect merge. (#7032)
Add new device tasks to the right list so that they're processed and marked as
ignored correctly later.
2019-09-19 14:40:32 +02:00
Vincent Dondain c10aa03642
Bump maccore for device scheduling fix (#7027)
New commits in xamarin/maccore:

* xamarin/maccore@486ad67875 [device-builds] Fix if condition typo (double `[`) (#1985)
* xamarin/maccore@fda32707a7 [tests] Update (and hopefully simplify)  submission tests documentation wrt cerficates/profiles expiration (#1972)
* xamarin/maccore@f23cd3a194 Merge pull request #1977 from xamarin/swift-o-matic-protocol-list-enum-factory
* xamarin/maccore@aaa2bec8da Enum factory test
* xamarin/maccore@d3c7890df2 Merge pull request #1974 from xamarin/swift-o-matic-protocol-list-enum
* xamarin/maccore@436a376ab4 [provisioning-profiles] Add 'Developer ID Application' and 'Developer ID Installer' certificates. (#1975)
* xamarin/maccore@ddc68fc899 Support for protocol list types in enum payloads.

Diff: 4611683312..486ad67875
2019-09-18 21:55:17 -04:00
Rolf Bjarne Kvinge b8f9dccdcc
Merge pull request #7003 from xamarin/master-xcode11
Merge xcode11 into master.
2019-09-18 07:47:14 -07:00
Rolf Bjarne Kvinge 693dc758ec
[runtime] Build and ship Xamarin[-debug].framework.dSYM. Fixes #7004. (#7014)
Fixes https://github.com/xamarin/xamarin-macios/issues/7004.
2019-09-18 05:19:17 -07:00
Rolf Bjarne Kvinge da2fd8bd22
[runtime] Silence, please. (#7013) 2019-09-18 02:00:44 -07:00
Rolf Bjarne Kvinge e7a5d56dd2 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-17 19:44:13 +02:00
Rolf Bjarne Kvinge cd26431728 Fix version numbers. 2019-09-17 19:43:34 +02:00
Waleed Chaudhry 706581c1ab Fix broken introspection tests on macOS 10.15. Fixes #6998. (#6999)
* Fix broken introspec tests on macOS 10.15

* Add aliases

* Add fields to .ignore

* Remove new line

* Add comment to .ignore
2019-09-16 23:40:34 -07:00
Vincent Dondain 2225994c2c
Bump for Xcode 11 GM 2 (#7006) 2019-09-16 16:57:31 -04:00
Rolf Bjarne Kvinge 0186f0ec1a Fix merge failure. 2019-09-16 16:08:34 +02:00