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

325 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge df523c8b18 Merge remote-tracking branch 'origin/xcode11' into d16-3. 2019-09-17 08:30:12 +02:00
Rolf Bjarne Kvinge 77d5377ddc Fix broken merge. 2019-09-13 16:16:22 +02:00
Alex Soto a1fba90ecb
[ModelIO] Fix MDLAnimatedQuaternion bindings (#6991)
Quaternion does need our special marshalling.
2019-09-12 10:53:42 -04:00
Rolf Bjarne Kvinge f6e0531197 Merge xcode11 into d16-3. 2019-09-12 08:29:02 +02:00
Rolf Bjarne Kvinge 366f46ba21
[ModelIO] Implement new API introduced with Xcode 11 b1-7. (#6930) 2019-09-09 13:15:07 -07:00
Rolf Bjarne Kvinge a9abc07cb3
Rename bundle identifier for the frameworks we ship. Fixes #6920. (#6926)
Rename the bundle identifier for the frameworks we ship, because apparently
Apple has added an App Store check to reject apps with multiple frameworks
with the same bundle identifier.

For some reason that includes rejecting frameworks that are both in iOS and
watchOS apps. This feels like a bug on Apple's end, but we can still easily
work around it, so let's do just that.

Strictly speaking it's not necessary to change the bundle identifier for tvOS
frameworks, but it's more consistent that way.

Fixes https://github.com/xamarin/xamarin-macios/issues/6920.
2019-09-06 09:30:49 -07:00
Rolf Bjarne Kvinge 08809f5bf7
[d16-3] Implement notarization. (#6927)
* Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)

Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.

* Jenkinsfile notarization (#6869)

* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.

* Use dummy function name which our tests won't complain about.
2019-09-06 05:35:12 -07:00
Sebastien Pouliot 9e193eaca3
[foundation] Add support for NSValue/CGAffineTransform and StoreValueAtAddress overload (#6887)
Support for `NSValue`/`CGAffineTransform` exists in iOS/tvOS/watchOS,
from UIKit, but not for macOS. However this will be required for the
new protocols inside CoreImage.

Also add an overload for `StoreValueAtAddress` since the original
one was deprecated but we did not provide the new alternative to
update the code.
2019-08-30 18:00:04 -04:00
Rolf Bjarne Kvinge ec09193daf
Build native code with -std=c++14. (#6864)
* Build native code with -std=c++14.

Apple's headers now require -std=c++14 to compile their headers in C++ mode.

This fixes a compile error that would occur with the PhotosUI framework when
compiling code for C++.

* [mmp] Use -std=c++14 when compiling.

* Fix command line output.

* [mmp] Add all source files at the end, so they all get the -x clang argument applied.

* Limit when using c++14 in mtouch according to language.
2019-08-29 08:49:06 -07:00
Rolf Bjarne Kvinge 010ae1d2c9
[runtime] Fix usage of objc_msgSend[Super] according to modified headers. (#6865)
It's now required to cast objc_msgSend[Super] to a function of the correct
signature, so let's do that.

Also remove the define that allowed us to use the previous behavior.
2019-08-28 08:05:38 -07:00
Rolf Bjarne Kvinge f3fbbd7047
Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)
Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.
2019-08-26 09:51:50 -07:00
Jo Shields a29ae8e6df Bump to mono:2019-06 (#6196)
* Use the commonly used casing for `MSBuildSDKsPath` property

Handle "incorrectly" cased msbuild property names

msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.

* [mtouch] Whitelist new Brotli native symbols in Xamarin.Tests.Misc.PublicSymbols test

* [mtouch] Better assert in NoLLVMFailuresInWatchOS() test

We'd list the "LLVM failed" messages before even though the AOT might've crashed and the list is meaningless. Assert the exit code before that.

* [mtouch] Use new LLVM even for 32bit targets

See https://github.com/mono/mono/issues/14841 and https://github.com/mono/mono/issues/9621

* [mtouch] Work around slow LLVM in "don't link" test

See https://github.com/mono/mono/issues/14843

* Remove useless conditional

* Remove LLVM36 from Makefile

* [watch4] set right min version for arm64_32 based watch devices (#6307)

Fixes the confusion around `libmono-native*` (see for example ce5ba1e41d (commitcomment-33834491) ) when building with `MONO_BUILD_FROM_SOURCE=1`.

* reflect watchos64_32_version_min change from mono sdk

* Move mono hash info to mk/mono.mk so that existing scripts work.

* Add Makefile dependency on mono.mk where necessary

With 3e7bc29ade the Mono hash was moved from Make.config to mono.mk.

We need to add a Makefile dependency on this file wherever Make.config was used to track a Mono dependency.

* [tests] Copy mk/mono.mk to the XM test package.

* [tests] Update minOS version test after consolidating min watchOS versions everywhere.

Fixes this mtouch and mmptest failure:

    1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOSSimulator,False)
      Failures
      Expected: <empty>
      But was:  < "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (mono-runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-generated-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (shared-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-invoke-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (xamarin-support-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (nsstring-localization-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-varargs-debug.arm64_32.o)."... >

* [mmp] Fix make clean target

It needs an -r to remove directories:

```
rm: bin: is a directory
rm: obj: is a directory
```

* Add new xamarin_timezone_get_local_name() to a few more places
2019-07-16 17:24:00 +02:00
Rolf Bjarne Kvinge a495077533
[xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393)
This includes:

* 32-bit version of Xamarin.Mac.dll and OpenTK.dll
* XamMac.dll and XamMac.CFNetwork.dll
* 32-bit versions of the runtime libraries (libxammac.a and friends).
* 32-bit version of the partial static library for Xamarin.Mac.
* Classic support in the generator.

We still ship a few Classic files so that Visual Studio for Mac continue to detect that Xamarin.Mac is installed (otherwise VSfM won't open Classic projects, which makes it impossible to use the migration wizard).

This makes our build slightly faster.

Partial fix for #6300.
2019-07-15 10:19:24 -07:00
Steve Pfister a7cb29a4b7 Ensure Local TimeZone Id is Set For TimeZoneInfo.Local (#6564)
* Mirrors the runtime change found in https://github.com/mono/mono/pull/15667.

The fix here is to return the name of the local time zone so that TimeZoneInfo.Local
can have the correct Id.

* Added nil check on name.  Returns Local as the Id in the case of nil
2019-07-15 00:47:11 -07:00
Vincent Dondain 85c955d0b2 [arkit] Update for Xcode 11 beta 2 and beta 3 (#6460) 2019-07-04 07:33:37 +02:00
Rolf Bjarne Kvinge a073c81c45
[AppKit] Implement [NSView sortSubviewsUsingFunction:context:] (#6485)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/941421.
2019-07-04 07:30:44 +02:00
Rolf Bjarne Kvinge 801b11c60b [runtime] Implement a different fix for #6258. Fixes #6302.
It turns out 'object_getClass' and '[obj class]' does not return exactly the
same. It seems this would have gone unnoticed (the difference would not be
important), except that it made us run into yet another Objective-C runtime
bug...

So return to the previous behavior (call 'object_getClass'), and instead call
'[obj class]' as well just before to make sure the Class instance we get back
from 'object_getClass' is initialized properly.

Now you may wonder why the return value from '[obj class]' has an effect on
the different return value from 'object_getClass', and the answer is that I
have no idea whatsoever. It works, and that makes me happy.

Fixes https://github.com/xamarin/xamarin-macios/issues/6302.
2019-06-14 19:59:02 +02:00
Rolf Bjarne Kvinge ab8817d000
Merge pull request #6294 from rolfbjarne/xcode11-watchsimulator
Fix building and launching watchOS apps. Fixes #6252.
2019-06-14 16:42:13 +02:00
Rolf Bjarne Kvinge 70844a81df
[runtime] Use '[obj class]' instead of 'object_getClass' to work around an Objective-C runtime bug. Fixes #6258 and #6255. (#6293)
Xcode 11 introduces a bug in the Objective-C runtime that makes the runtime
surface uninitialized Class instances. Using these instances may lead to
crashes. Work around this issue by using a different API to get Class
instances for Objective-C objects, hoping that we won't see uninitialized
Class instances.

Ref: https://trello.com/c/2g7qtnGO/143-fb6153904-classcopyprotocollist-crashes-in-ios-13

Fixes https://github.com/xamarin/xamarin-macios/issues/6258.
Fixes https://github.com/xamarin/xamarin-macios/issues/6255.
2019-06-14 16:33:03 +02:00
Rolf Bjarne Kvinge 62043318d7 [runtime] Assume we're in the US if the OS doesn't know.
This fixes a crash when running tests in the watchOS 6.0 simulator.
2019-06-14 02:17:37 +02:00
Manuel de la Pena a0a23a42d6 Add the missing flags to the native templates. 2019-06-04 18:42:46 +02:00
Alexander Köplinger 48b3b82410 Merge remote-tracking branch 'upstream/master' into binary-artifacts
# Conflicts:
#	builds/Makefile
#	external/mono
2019-05-22 20:07:18 +02:00
Bernhard Urban 06fcf59b78 [build/runtime] Add build rules for arm64_32 2019-05-22 08:05:40 +02:00
Alexander Köplinger 247a6bf551 Switch to mono archive and remove submodule 2019-05-21 22:16:02 +02:00
Rolf Bjarne Kvinge 47beab425d Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-16 15:26:15 -07:00
Chris Hamons 155bb924de
Revert "[launcher] Pass --use-map-jit to mono on XM app startup" (#6051)
- This reverts commit 2278512aba.
- This is no longer necessary due to https://github.com/mono/mono/pull/14395
2019-05-16 15:09:02 -07:00
Rolf Bjarne Kvinge f272f69e3a [runtime] Enable the varargs dynamic trampolines for arm64_32.
The varargs dynamic is not even close to correct for arm64_32, but it's still
better than failing to compile the runtime.

A proper dynamic registrar for arm64_32 is much more complicated, in
particular because we can't use assembly code, so it will have to be
implemented later.
2019-05-10 08:28:43 +02:00
Bernhard Urban 4606d37d64 [build/runtime] Add build rules for arm64_32 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge c97d267faf
[runtime] Implement support for an arm64 dynamic registrar. (#6005)
This is required in order to execute downloaded assemblies (or any other
assembly not known at compile time) on device.
2019-05-07 07:35:39 +02:00
Rolf Bjarne Kvinge 37a280d974
[runtime] Put LOGZ directive in a header to not duplicate it everywhere. (#6001) 2019-05-06 19:29:28 +02:00
Rolf Bjarne Kvinge 82f288a135
[runtime] Refactor a bit to share code between files. (#6000) 2019-05-06 16:19:56 +02:00
Rolf Bjarne Kvinge 4be637aa8e
[registrar] Fix marshalling of structs with a single member. (#5986) 2019-05-06 07:26:54 +02:00
Rolf Bjarne Kvinge 83058e339c
[runtime] Fix crash in the x86_64 dynamic registrar. (#5989)
In [this][1] innocuous-looking commit I made the x86_64 dynamic registrar
crash when TRACE is defined. The underlying problem is that CallState's rsi
field is re-used as rax upon exit of the trampoline. This means that the
CallState.sel () function that gets the selector, will instead get the return
value upon exit. When TRACE is defined, we try to print the selector upon
exiting the trampoline, and since the rsi field is now the rax field, we end
up trying to print the return value as if it were a selector, and things go
slightly sideways.

[1]: https://github.com/xamarin/xamarin-macios/commit/464882d14a83
2019-05-06 07:25:49 +02:00
Rolf Bjarne Kvinge 50f573e84e [runtime] Add new functions to the header so that they don't use C++ mangling.
Fixes these test failures:

    2) Failed : Xamarin.Tests.Misc.PublicSymbols(iOS)
      Failed libraries
      Expected: <empty>
      But was:  "/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libxamarin-debug.a:
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj"

    3) Failed : Xamarin.Tests.Misc.PublicSymbols(tvOS)
      Failed libraries
      Expected: <empty>
      But was:  "/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.AppleTVSimulator.sdk/usr/lib/libxamarin-debug.a:
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj"

    4) Failed : Xamarin.Tests.Misc.PublicSymbols(watchOS)
      Failed libraries
      Expected: <empty>
      But was:  "/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a:
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj"

    5) Failed : Xamarin.Tests.Misc.PublicSymbols(macOSMobile)
      Failed libraries
      Expected: <empty>
      But was:  "/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/libxammac-system-debug.a:
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_nsobject_to_objectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z26xamarin_object_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_inativeobject_to_nsobjectP10MonoObjectPvPj
    	__Z33xamarin_nsobject_to_inativeobjectP11objc_objectPvP10_MonoClassS1_Pj
    	__Z40xamarin_nsobject_to_inativeobject_staticP11objc_objectPvP10_MonoClassS1_Pj"
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 868b3ecf44 [registrar] Add support for ref/out arrays. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge e6790b277b [registrar] Fix support for ref string parameters. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge b750056271 [registrar] Fix/implement returning SEL/Class in a ref/out parameter in the registrars. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 84b99d85e5 [registrar] Reuse some more array conversion code from the static registrar. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 8fee355aa5 [runtime] Add support for value types to xamarin_convert_managed_to_nsarray_with_func/xamarin_convert_nsarray_to_managed_with_func. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 045945817b [registrar] Extract code to create a managed array from an NSArray to a separate method. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 2cb20de784 [registrar] Extract code to create an NSArray from a managed array to a separate method. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge d9c0d5e93a [runtime] Report which element failed to convert when marshalling an array between Objective-C and managed code. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 128fa1815f [registrar] Some more simplification. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 484b9a3c37 [registrar] Don't let a failure to copy back a parameter go unnoticed.
Now that we ignore parameters we're not copying back, we can throw an
exception if we run into a parameter we don't know how to copy back.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge c7a6342900 [registrar] Simplify code a bit and reduce indentation.
Best reviewed by ignoring whitespace.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge a1bf26af90 [registrar] Simplify copyback loop a little bit.
Simplify by having a single loop variable, and remove the usage of the
other ('ofs'), since it's not needed.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 141caaf8dc [registrar] Improve writeback logic for out/ref parameters.
* Keep track of which parameters needs to be written back. This makes sure the
  writeback loop doesn't run into non-writeback-parameters it doesn't know how
  to handle (by skipping them completely).

* Keep track of the (post-marshal) input to the out/ref parameters, so that we
  know whether we need to marshal anything back in the writeback loop.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 4a173ec96f [registrar] Fix multiple ref/out parameters for a single method.
The previous code would break the loop looking for ref/out parameters after finding the first one.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 497bacc6af [registrar] Refactor to reduce indentation a bit.
Best viewed by ignoring whitespace.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge ab5698c451 [registrar] Create a xamarin_nsstring_to_string to avoid code duplication. 2019-04-30 14:29:24 +00:00