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

426 Коммитов

Автор SHA1 Сообщение Дата
Andy Gocke b8af230eaa
Update Xamarin.Shared.Sdk.targets 2022-07-10 19:46:37 -07:00
Andy Gocke c558df7524
Merge branch 'main' into set-trimmode-partial 2022-07-10 19:45:16 -07:00
Andy Gocke a14002ad53 Missed a few more places where _LinkMode was used 2022-06-28 12:10:01 -07:00
Andy Gocke d67523d437 Set TrimMode to partial if not set
Companion to https://github.com/dotnet/linker/pull/2856
2022-06-28 11:47:44 -07:00
Rolf Bjarne Kvinge 3e10f01a8d [dotnet] Adjust condition for _ComputeLinkNativeExecutableInputs to ignore the entire target unless connected to a Mac.
Fixes:

> Xamarin.Shared.Sdk.targets(1151,14): error MSB4184: The expression "[MSBuild]::VersionGreaterThanOrEquals('', 14.0)" cannot be evaluated. Version string was not in a correct format.
2022-06-15 16:20:09 +02:00
Rolf Bjarne Kvinge 22f7ad1deb Fix typo. 2022-06-13 12:20:48 +02:00
Rolf Bjarne Kvinge c05e774612 [dotnet/tools] Disable compact unwind on Xcode 14 to fix linker warnings.
Ref: https://codereview.chromium.org/2784253003
Ref: https://github.com/grain-lang/binaryen.ml/pull/136
Ref: https://github.com/ocaml/ocaml/issues/9026
Ref: https://gitlab.haskell.org/ghc/ghc/-/issues/11829
2022-06-13 10:56:02 +02:00
Rolf Bjarne Kvinge 737717eabc Bump to 7.0. 2022-06-07 17:50:49 +02:00
Rolf Bjarne Kvinge db91c70f41 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-07 11:10:24 +02:00
Rolf Bjarne Kvinge 5039634a5c
[dotnet] Condition default inclusion on the target framework version. (#15196) 2022-06-07 09:45:16 +02:00
Rolf Bjarne Kvinge d167ae86b8 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-03 13:39:55 +02:00
Rolf Bjarne Kvinge 0e5b2c32c1
[dotnet] Remove some dead build logic. (#15180)
The _BTouchCompileCommand property is never used, so we can just delete it.
2022-06-03 10:41:09 +02:00
Rolf Bjarne Kvinge b062f2be6c
[dotnet] Change condition when to include the System.Runtime.InteropServices.NFloat.Internal package reference. (#15183)
'BundledNETCorePlatformsPackageVersion' will be 7.0 when building with .NET 7
and using the 'net6.0-*' TFM, but we still need the package reference in that
case. So change the condition to go off TargetFrameworkVersion instead.
2022-06-03 10:40:07 +02:00
dotnet-maestro[bot] 155016c3aa
[net7.0] Update dependencies from dotnet/installer (#14650)
* Update dependencies from https://github.com/dotnet/installer build 20220404.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22204.1

Dependency coherency updates

Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref
 From Version 7.0.0-preview.4.22181.10 -> To Version 7.0.0-preview.4.22201.3 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22205.16

Dependency coherency updates

Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref
 From Version 7.0.0-preview.4.22181.10 -> To Version 7.0.0-preview.4.22205.1 (parent: Microsoft.Dotnet.Sdk.Internal

* [tests] Remove dead code.

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22207.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22206.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22207.24

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22206.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22208.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22206.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22211.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22208.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22212.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22212.35

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22214.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22214.17

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22215.7

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22217.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22211.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22218.29

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22213.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.4.22219.19

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22213.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22220.23

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22213.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22221.9

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22213.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22225.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22213.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22227.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22226.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22227.8

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22227.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22228.6

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22227.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22229.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22253.34

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22255.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22256.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22256.8

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22257.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22258.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22228.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22260.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22259.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22260.20

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22259.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22261.8

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22259.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22262.14

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22259.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22263.22

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22259.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22267.11

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22266.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Attempt workaround for https://github.com/dotnet/linker/issues/2759

* [runtime] Skip passing ICU_DAT_FILE_PATH to the runtime if we don't have an ICU data file.

* [dotnet] Write our own code for the global using for nfloat.

This way we can ignore this compiler warning:

    The type name 'nfloat' only contains lower-cased ascii characters. Such names may become reserved for the language.

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22273.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22270.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Revert "Attempt workaround for https://github.com/dotnet/linker/issues/2759"

This reverts commit 8650556904.

* [src] Fix computing the value type size of System.UIntPtr.

* Why is this needed?

> SpriteKit/SKNode.cs(89,29): error CS0121: The call is ambiguous between the following methods or properties: 'NSMutableSet<TKey>.NSMutableSet(NativeHandle)' and 'NSMutableSet<TKey>.NSMutableSet(nint)'

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22274.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22273.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.4.22201.11 -> To Version 7.0.100-preview.5.22274.9

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22273.1 (parent: Microsoft.Dotnet.Sdk.Internal

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-05-26 08:43:43 +02:00
Rolf Bjarne Kvinge db36bd83c1 Merge remote-tracking branch 'origin/main' into net7.0 2022-05-25 09:34:42 +02:00
Rolf Bjarne Kvinge da7dd02dfd
[dotnet] Make sure to not run the linker when we're on a disconnected Windows build. (#15076)
This also means that we shouldn't load the linker's output. Note that we need
to check _LoadLinkerOutput even if we've already disabled the linker, because
there may be linker output from a previous (connected) build, and we don't
want to load that.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1542438.
2022-05-23 16:33:09 +02:00
Rolf Bjarne Kvinge f5dfe434bd Merge remote-tracking branch 'origin/main' into net7.0 2022-05-19 23:20:20 +02:00
Rolf Bjarne Kvinge 4c2ddcf349
[dotnet-linker] Bump default trampoline count when using the interpreter on x64 in .NET. Fixes #14887. (#15025)
Fixes https://github.com/xamarin/xamarin-macios/issues/14887.
2022-05-18 11:27:28 +02:00
Rolf Bjarne Kvinge 92eda7f353
[dotnet] Add support for selecting whether to create P/Invoke wrappers or not. Fixes #4940. (#14961)
* This is a potential mitigation for slower transition to native code when
  exception marshalling is enabled (#14812).
* A minor modification was required in the linker, to make sure any modified
  assemblies are saved.

Fixes https://github.com/xamarin/xamarin-macios/issues/4940.
2022-05-11 16:42:01 +02:00
Rolf Bjarne Kvinge f2bcedd441
[msbuild/dotnet] Add support for passing --aot arguments to the AOT compiler. (#14936)
Pick up --aot arguments in MtouchExtraArgs and pass them to the AOT compiler
when building a .NET project. This makes it possible to work around #14887 by
manually increasing the number of trampolines.

Ref: https://github.com/xamarin/xamarin-macios/issues/14887
2022-05-10 16:25:19 +02:00
Rolf Bjarne Kvinge 525407b104 Merge remote-tracking branch 'origin/main' into net7.0 2022-05-09 15:50:41 +02:00
Rolf Bjarne Kvinge 01c3127c8c
[dotnet] Don't set '_RunAotCompiler' on macOS if 'MtouchInterpreter' is set. (#14874)
There's no AOT compiler for macOS, so setting _RunAotCompiler causes problems
because if it's set, we try to find the AOT compiler, and because there is
none, the build fails.

So don't set '_RunAotCompiler' if 'MtouchInterpreter' is set (which also
indirectly means if 'UseInterpreter' is set) to avoid the problem altogether.
2022-05-05 16:16:40 +02:00
Rolf Bjarne Kvinge 86b14a77a2 Merge remote-tracking branch 'origin/main' into net7.0 2022-05-05 09:04:10 +02:00
Eric Sink b84b80902c
Build fixes (-dotnet) for app extensions (#14685)
Resolves #14285 

1.  Make sure `libextension-dotnet.a` gets built, and with the `-DEXTENSION` flag.
2.  Make sure `libextension-dotnet.a` gets included in the package alongside `libxamarin-dotnet.a`
3. At build time, make sure to link with the correct lib[tv]extension-dotnet.a library depending when we need to.
4. Add some tests.

Co-authored-by: Eric Sink <eric@Erics-MacBook-Pro.local>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-04-25 16:56:52 +02:00
Rolf Bjarne Kvinge a9a638553f
[msbuild/dotnet] Fix building binding projects on Windows in .NET (#14704)
When building a binding project, we need to execute bgen (and csc) on the mac. Figuring
out where these files are on the Mac is rather complicated from a remotely executed
task, so instead we execute a sub-build that computes these properties.

In legacy Xamarin this was accomplished by building the 'Xamarin.iOS.ObjCBinding.Common.props'
file using msbuild, and invoking a custom target that prints the property we're looking
for (the 'targetGetPropertyValue_*' targets).

For multiple reasons this approach doesn't work in .NET anymore (in particular it
seems that the 'Xamarin.iOS.ObjCBinding.Common.After.targets' file with the custom
'targetGetPropertyValue_*' targets is nowhere to be found, but logic has also moved
around in the .targets/.props files which makes just building the 'Xamarin.iOS.ObjCBinding.Common.props'
not work correctly since the properties we need wouldn't be set).

So I'm adding a new task that does a sub-build, using either msbuild or dotnet as
appropriate, to compute the properties we need. Instead of building the 'Xamarin.iOS.ObjCBinding.Common.props'
file, the task creates an actual binding project (an empty one), and executes the
new '_WriteRemoteGeneratorProperties' target in this binding project.

An additional advantage in this new task is that it will only execute one sub-build
where all the properties are computed (the previous approach executed one sub-msbuild
per property).

In order to keep code as similar as possible between legacy Xamarin and .NET, the
new task is being used for legacy Xamarin as well (and the old approach deleted).

This fixes building binding projects on Windows in .NET.
2022-04-22 16:17:03 +02:00
Rolf Bjarne Kvinge a806c658c9 Merge remote-tracking branch 'origin/main' into net7.0 2022-04-07 09:36:50 +02:00
Rolf Bjarne Kvinge 9c185e1fff
[msbuild] Ask ditto to thin native libraries according to the architectures we're targetting. Fixes #13081. (#14403)
Ask ditto to thin native libraries and frameworks when copying them to the app
bundle to remove slices for architectures we're not building for.

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/13081.

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-04-07 08:17:01 +02:00
Rolf Bjarne Kvinge a98fefaea0 Merge remote-tracking branch 'origin/main' into net7.0 2022-04-06 10:17:54 +02:00
Emanuel Fernandez Dell'Oca 3af92421f9
[dotnet] Adds platform specific RID options (#14643)
This enables Visual Studio to set a specific `RuntimeIdentifier` for each platform when building all target frameworks in a MAUI project.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-04-06 09:39:33 +02:00
Rolf Bjarne Kvinge 4f46162e2b Merge remote-tracking branch 'origin/main' into net7.0 2022-03-31 09:11:54 +02:00
Rolf Bjarne Kvinge 6fa6b75f19
[dotnet] Don't include @(Compile) and @(EmbeddedResource) items in @(BundleResource) items by default. Fixes #14442. (#14571)
Fixes https://github.com/xamarin/xamarin-macios/issues/14442.
2022-03-31 08:17:53 +02:00
Alexander Köplinger b8c493c3e1
Set IsImplicitlyDefined="true" on the System.Runtime.InteropServices.NFloat.Internal PackageReference (#14532)
* Set IsImplicitlyDefined="true" on the System.Runtime.InteropServices.NFloat.Internal

This unbreaks Central Package Management via https://github.com/microsoft/MSBuildSdks/tree/main/src/CentralPackageVersions which is being worked on for NuGet, see https://github.com/NuGet/Home/issues/6764

* Add test case

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-30 10:13:39 +02:00
Rolf Bjarne Kvinge e652068e5e Merge remote-tracking branch 'origin/main' into darc-main-fc6e47e2-7b69-4464-b65f-8f67ca26b4e8 2022-03-25 14:32:42 +01:00
Rolf Bjarne Kvinge 43f87ec4c1
[msbuild] Only conditionally copy the entire input directory from Windows in the Ditto task. (#14495)
Sometimes we want to copy the entire input directory from Windows to the Mac
when executing the Ditto task remotely, and sometimes we don't.

In particular we do not want to copy the input directory when the directory on
Windows is an incomplete mirror of what's on the Mac - one scenario being when
copying the app bundle to prepare for IPA creation. The .app directory on
Windows is not complete - all the files are there (maybe? not quite sure, but
that's beside the point here), but some may be empty, because when we only
care about the timestamp for a file, we'll create an empty file on Windows to
mirror the actual file on Mac. Copying this incomplete directory to the Mac,
overwriting the correct files there, will break things badly.

However, sometimes we're not mirroring a directory on Windows, but instead we
have directories as actual build input (for instances frameworks from NuGets),
and in that case we want to copy everything to the Mac.

So this PR adds a parameter to the Ditto task to optionally copy the directory
from Windows for remote builds, and we enable this behavior when we want it -
specifically when copying frameworks.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1506009 while not
regressing https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1492635.

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1506009
Ref: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1492635
Ref: https://github.com/xamarin/xamarin-macios/pull/14375
2022-03-25 14:08:05 +01:00
Rolf Bjarne Kvinge c4f0087c98 Merge remote-tracking branch 'origin/main' into darc-main-fc6e47e2-7b69-4464-b65f-8f67ca26b4e8 2022-03-25 09:46:57 +01:00
Rolf Bjarne Kvinge 78963700e7
[dotnet] Only add a global nfloat using if we're compiling for C# 10 or later. Fixes #14434. (#14475)
Fixes https://github.com/xamarin/xamarin-macios/issues/14434.
2022-03-24 10:14:16 +01:00
Rolf Bjarne Kvinge e5c81564e2 [msbuild/dotnet] Rework how we handle app bundle post processing. Fixes #14067.
Change dSYM generation and native stripping to occur immediately before code signing,
in a newly minted post processing target.

Challenges:

* Both calling 'strip' and 'codesign' on an executable modifies that executable,
  which means that we must make sure to not call 'dsymutil' on the same binary at
  a later point unless it's been rebuilt.
* Thus we must make sure to update 'dsymutil's stamp file whenever we call 'strip'
  and/or 'codesign' on an executable.
* Just like for code signing, we must store the libraries (either static or dynamic)
  we post process in extension/watch/rid-specific projects, so that these libraries
  can be loaded in containing projects and processed there.
* In universal .NET builds, debug symbols are created for the universal app bundle,
  not for each rid-specific version of the app bundle. So I had to add logic to create
  the native symbol lists (MtouchSymbolsList) for each rid-specific build, but then
  collect them and merge those lists for the universal app bundle.

The existing SymbolStrip call we did right after linking the native executable has
been removed, because we have to do that after creating the dSYM (which the GenerateDebugSymbols
target does).

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/14067.
2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge 3f4cbb5e44 Merge remote-tracking branch 'origin/main' into darc-main-fc6e47e2-7b69-4464-b65f-8f67ca26b4e8 2022-03-11 14:34:02 +01:00
Rolf Bjarne Kvinge bb655a3840
[dotnet] Only validate the RuntimeIdentifier if we need/use it. Fixes #13482. (#14339)
Fixes https://github.com/xamarin/xamarin-macios/issues/13482.
2022-03-09 08:22:52 +01:00
Rolf Bjarne Kvinge 3da0665ff5
[msbuild] Make the _NoSymbolStrip and _NoDSymUtil properties public by removing the leading underscore. (#14248)
These are useful properties that were exposed in legacy Xamarin as Mtouch*
properties.
2022-02-28 11:27:44 +01:00
Rolf Bjarne Kvinge bd97933b60
[runtime] Remove ObjCRuntime.nfloat in favor of System.Runtime.InteropServices.NFloat. (#14197)
* Remove ObjCRuntime.nfloat (in favor of   System.Runtime.InteropServices.NFloat).
* Automatically add a reference to the System.Runtime.InteropServices.Internal
  package, so that developers get the new NFloat API (with operators) we've
  added post .NET 6 (but don't do this for .NET 7).
* Automatically add a global using alias for
  System.Runtime.InteropServices.NFloat -> nfloat. This is not behind the
  usual `ImplicitUsings` condition our other implicit usings are, because
  they're off by default for existing projects, and the main target for the
  global using alias for nfloat is upgraded projects.
* Automatically generate a global using alias (like above) in the generator
  for all code the generator compiles.
* Update xtro entries to reference System.Runtime.InteropServices.NFloat
  instead of ObjCRuntime.nfloat.
* Add a workaround for a hopefully temporary issue with .NET/CoreCLR where the
  wrong runtime pack is selected otherwise (without the new NFloat API, so
  nothing works at runtime).

Ref: https://github.com/xamarin/xamarin-macios/issues/13087
2022-02-24 16:51:12 +01:00
Rolf Bjarne Kvinge 4fd770c3c4
[msbuild/generator] Pass .NET's C# compiler to bgen to use. Fixes #12922. (#14192)
We can't execute mono's C# compiler when using .NET, so we need to tell bgen
where csc is in that case.

Fixes https://github.com/xamarin/xamarin-macios/issues/12922.
2022-02-23 09:36:43 +01:00
Rolf Bjarne Kvinge 78b17e1a24 More bumps. 2022-02-21 22:27:34 +01:00
Rolf Bjarne Kvinge 96c32e380e
[msbuild/dotnet] Make codesigning createdump work in universal apps. Fixes #14155. (#14196)
We don't sign each rid-specific bundle, but we sign the final merged app bundle instead.
This means that we must store the list of files to codesign from the rid-specific
build and load those lists before running codesign on the merged app bundle.

https://github.com/xamarin/xamarin-macios/issues/14155.
2022-02-21 08:24:09 +01:00
Rolf Bjarne Kvinge 21d7dd8de3
[msbuild] Move debug-related targets to shared code. (#14180) 2022-02-18 16:35:28 +01:00
Rolf Bjarne Kvinge e25163f573
[.NET] Rename our product assemblies. Fixes #13748. (#13847)
Rename our product assemblies to:

* Microsoft.iOS.dll
* Microsoft.tvOS.dll
* Microsoft.macOS.dll
* Microsoft.MacCatalyst.dll

This makes it easy to distinguish between legacy Xamarin and .NET whenever the
product assembly is mentioned, and I've also chosen the platform part of the
name to match how the platforms are named elsewhere (this also makes it
possible to simplify our build logic, since we can remove a lot of special
casing).

Fixes https://github.com/xamarin/xamarin-macios/issues/13748.
2022-02-16 21:30:32 +01:00
Rolf Bjarne Kvinge 5b8250486f
[dotnet/msbuild] Run install_name_tool to fix the id for dylibs. Fixes #13999. (#14147)
Fixes https://github.com/xamarin/xamarin-macios/issues/13999.
2022-02-16 21:13:40 +01:00
Eric Erhardt 0f68a8231b
Default VerifyDependencyInjectionOpenGenericServiceTrimmability (#14130)
We need to use better default values for `$(VerifyDependencyInjectionOpenGenericServiceTrimmability)`.

This feature switch ensures that DynamicallyAccessedMembers are applied correctly to open generic types used in Dependency Injection.

In the base SDK, this switch is enabled when `PublishTrimmed=true`. However, iOS apps don't set `PublishTrimmed=true` until a Target. So devs are missing out on this validation.

Conversely, in published apps, we don't want to pay the cost of doing this validation. It was showing up in startup profiles on Android. So turning the feature switch off in Release builds (builds without debugging enabled).

Port of 90f546cacc

Note, in Android we used `PublishTrimmed` to set this property, but in iOS `PublishTrimmed` isn't set yet. So I followed the same pattern as `UseSystemResourceKeys`, which is the same scenario - when a dev is developing the app vs. a production build.
2022-02-15 08:39:28 +01:00
Rolf Bjarne Kvinge d8e7d2c854
[dotnet] Sign the 'createdump' executable. Fixes #13417. (#14111)
Fixes https://github.com/xamarin/xamarin-macios/issues/13417.
2022-02-15 08:28:29 +01:00
Rolf Bjarne Kvinge 8b3b6a7adf
[dotnet/runtime] Fix a few issues with regards to extensions in .NET. Fixes #13742. (#14115)
* Propagate the IsAppExtension variable correctly.

* Don't try to call mono_domain_set_config for app extensions in .NET.

  It doesn't look like it's needed, and it also immediately aborts anyway, so
  if it turns out to be needed, another solution would have to be implemented.

Fixes https://github.com/xamarin/xamarin-macios/issues/13742.
2022-02-15 08:27:25 +01:00
Rolf Bjarne Kvinge 5e462b1c21
[dotnet] Fix non-bundling of debug files for release builds. Fixes #14085. (#14103)
Fixes https://github.com/xamarin/xamarin-macios/issues/14085.
2022-02-09 16:46:04 +01:00
Rolf Bjarne Kvinge 352a0d818a
[dotnet] Include all files in the Resources subdirectory as bundle resources. Fixes #13808. (#14018)
Include all files in the project's Resources subdirectory as BundleResource
items (except .DS_Store files, which are pretty omnipresent on macOS).

Also, contrary to the other default includes, add a condition so files are
only included if we have a resource prefix (typically "Resources"), otherwise
the entire hard drive might be included, and that's not really what we want.

Fixes https://github.com/xamarin/xamarin-macios/issues/13808.
2022-02-07 18:55:31 +01:00
Rolf Bjarne Kvinge 42c87ab2f7
[runtime] Make Runtime.Arch a readonly field in .NET. Fixes #5518. (#14076)
* Make Runtime.Arch a readonly field.
* Tell the AOT compiler Runtime.Arch is a constant value.
* Tell the linker to stub out the method we use to fetch the current
  architecture from native code (it turned out a bit complicated to set the
  Arch field when it's readonly - the solution I came up with was to call a
  P/Invoke).

Test case (size of the main executable): link all (debug)

* Before:  33.522.704 bytes
* After:   33.506.112 bytes
* Difference: -16.592 bytes (-0.05 %)

There were no size differences in release mode, nor were there any size
differences in the "don't link" test, neither for debug nor release mode.

Fixes https://github.com/xamarin/xamarin-macios/issues/5518.
2022-02-07 08:05:41 +01:00
imhameed adff9df98d
Link against the Compression framework. (#14034)
Mono will eventually use functions from the Compression framework to
decompress ICU data files during the runtime's initialization. Prepare
for this by linking against the compression framework.

Also see https://developer.apple.com/documentation/compression?language=objc.
2022-02-03 10:05:57 +01:00
Rolf Bjarne Kvinge 68aaef9ff7
[dotnet] Ask the linker to not mark copied assemblies if we're in a 'don't link' scenario. (#14011)
This speeds up builds significantly when the linker is disabled.

Test case: building tests/dotnet/MySimpleApp for macOS.

* Before: 37s
* After: 9s
* Difference: 26s (4x faster)

Test case: run the .NET tests

* Before: 2h55
* After: 1h43
* Difference: 1h12 (1.7x faster)

Contributes towards https://github.com/xamarin/xamarin-macios/issues/10251.
Ref: https://github.com/dotnet/linker/issues/2089
2022-02-02 08:36:17 +01:00
Rolf Bjarne Kvinge a14712d6e3
[dotnet] Convert windows dir separators to mac dir separators for relative paths in the _StripAssemblyIL target. Fixes #13838. (#13919)
It seems that MSBuild doesn't always automatically convert directory
separators for relative paths, so we have to do it ourselves.

Thanks to @lauxjpn for diagnosing this and coming up with a fix.

Fixes https://github.com/xamarin/xamarin-macios/issues/13838.
2022-01-28 10:28:47 +01:00
Rolf Bjarne Kvinge b5908a72d2 [dotnet] Use a task to collect decompressed *.[xc]frameworks. 2022-01-13 22:36:41 +01:00
Rolf Bjarne Kvinge 4c2d0fe103 [dotnet] Split decompressing zip files and figuring out what was inside the zip files in two different tasks.
Split decompressing zip files and figuring out what was inside the zip files
in two different tasks, so that we do the second part even if the first part
isn't done (it could have been done in a previous build).

This is required for rebuilds to work correctly.
2022-01-13 22:11:58 +01:00
Rolf Bjarne Kvinge 205f22ff75 [dotnet] Touch all the destination files when copying a directory to an app bundle.
This fixes the following problem:

* App with framework is built and signed.
* App is rebuilt, and the framework is copied in again.
* This time, the framework's executable's timestamp will be earlier than the
  timestamp when it was last signed, and as such it won't be signed again.

Fix this by touching all the copied files when copying a directory to the app bundle.
2022-01-13 22:09:02 +01:00
Rolf Bjarne Kvinge 214064d430 Merge remote-tracking branch 'origin/main' into dotnet-resolvedfiletopublish 2022-01-11 17:32:26 +01:00
TJ Lambert a0ad207ea7
[Dotnet] Automatically Allow Assets of all types and Test (#13346) 2022-01-10 08:32:05 -06:00
Rolf Bjarne Kvinge fa8f6a6f5c [dotnet] Update comment. 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge acdd27a9ef [dotnet] Update the relative path of every item left in ResolveFileToPublish.
Update the relative path of every item in the ResolveFileToPublish item group to
be relative to the root of the app bundle.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 62e5655009 [dotnet] Collect binding resource packages and remove them from the ResolvedFileToPublish item group.
Collect all the binding resource packages, add our binding resource packages to the
items that need to be resolved, and remove them from the ResolvedFileToPublish item
group.

Depending on the resolved content (static library, dynamic library, framework) of
a binding resource package, we must do different things , so these items must be
removed from the ResolvedFileToPublish item group.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 007bd92830 [dotnet] Collect dynamic libraries, add them to the _FileNativeReference item group, and remove them from the ResolvedFileToPublish item group.
Any dynamic libraries in _FileNativeReference will be copied to the app bundle elsewhere.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 6331fc6f23 [dotnet] Link with any static libraries, but remove them from the ResolvedFileToPublish item group.
Static libraries are not copied to the app bundle.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 434178fa2d [dotnet] Collect compressed plugins and remove them from the ResolvedFileToPublish item group.
The _DecompressPlugIns target will process all the items in the _CompressedPlugIns
item group, decompress them and add them to _DirectoriesToPublish. The compressed
file itself is not copied to the app bundle.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge b27ef8033d [dotnet] Collect plugins and remove them from the ResolvedFileToPublish item group.
We can't keep plugins in the ResolvedFileToPublish item group, because plugins are
usually directories, which may contain symlinks, which the built-in publish logic
doesn't handle correctly.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 5423457fd8 [dotnet] Collect compressed frameworks into the _CompressedAppleFrameworks item group and remove them from ResolvedFileToPublish.
The _DecompressAppleFrameworks target will process all the items in the _CompressedAppleFrameworks
item group, decompress them and add them to _FrameworkNativeReference. The compressed
file itself is not copied to the app bundle.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 2244a45e56 [dotnet] Collect and resolve .xcframeworks into .frameworks and add the result to the _FrameworkNativeReference item group. 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge c61c71409a [dotnet] Add frameworks to the _FrameworkNativeReference item group, and remove them from ResolvedFileToPublish. 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 010e7e216b [dotnet] The first thing we do after computing the bundle location for each path, is to re-populate the ResolvedFileToPublish item group with the results. 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 583230824d [dotnet] Remove _BundleResourceWithOutputPath from ResolvedFileToPublish, we're already handling those files elsewhere. 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 86b9fb4ea9 [dotnet] The 'createdump' executable goes in the same directory as all the assemblies 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 7096d7626d [msbuild] Remove the static libraries (.a) we ship with Xamarin from ResolvedFileToPublish 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 07f0f3eefb [dotnet] Only publish a single icu*.dat file 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 59096ba942 [dotnet] We're not bundling the runtimeconfig.json file.
It's parsed at build time (in the _CreateRuntimeConfiguration target), and stored
in a binary format, so we don't need the original json file.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 22220b149c [dotnet] Start using the new ComputeBundleLocation task 2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge 3dc0fe881a [dotnet] Add target to decompress compressed binding resource packages.
This new target will process all the items in the _CompressedAppleBindingResourcePackage
item group, decompress them, and then resolve the extracted results.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge ee55170feb [dotnet] Add target to decompress compressed plugins.
This new target will process all the items in the _CompressedPlugIns item group,
decompress them, and add them to _DirectoriesToPublish for later copying into the
app bundle.
2021-12-22 10:17:35 +01:00
Rolf Bjarne Kvinge e617903fac [dotnet] Add target to decompress compressed frameworks.
This new target will process all the items in the _CompressedAppleFrameworks item
group, decompress them, resolve them if necessary (for .xcframeworks) and add them
to _FrameworkNativeReference.
2021-12-22 10:17:34 +01:00
Rolf Bjarne Kvinge 0d0b0bc86b [dotnet] Always set 'UseAppHost' and '_RuntimeIdentifierUsesAppHost' to 'false' in .NET.
Otherwise .NET might want to include an app host in the app, which ends up with a
build warning, because we don't use apphosts.
2021-12-22 10:17:34 +01:00
Rolf Bjarne Kvinge 86a3689b77 [dotnet] Make sure that MSBuild doesn't strip away our PublishFolderType metadata 2021-12-22 10:17:34 +01:00
Rolf Bjarne Kvinge 94b1536ba8 [dotnet] There's no need to compute the publish location if we're not building a (publishable) app 2021-12-22 10:17:34 +01:00
Rolf Bjarne Kvinge 3b187b4075 [msbuild] Rename the _CopyFrameworksToBundle target to _CopyDirectoriesToBundle
We're soon going to use this task to copy other types of directories (such as plugins)
as well, and in that case the old target name would be misleading.
2021-12-22 10:17:34 +01:00
Rolf Bjarne Kvinge 55f11650b3 [msbuild] Move list of target dependencies for _ComputeFrameworkFilesToPublish to a separate property 2021-12-22 10:17:33 +01:00
Rolf Bjarne Kvinge b695c8c837
[dotnet] Don't add FileNativeReferences to the main libraries to link with. Fixes #13503. (#13598)
Don't add FileNativeReferences to the main libraries to link with, because we
pass that list of main libraries to the LinkNativeCodeTask, and we're already
passing the FileNativeReferences for a different task parameter.

This means that we end up adding the file native reference twice to the linker
arguments, and that's wasteful. It can also cause problems if those linker
arguments aren't always computed in the same way (once as a relative path,
once as an absolute path for instance).

Fixes https://github.com/xamarin/xamarin-macios/issues/13503.
2021-12-21 08:13:53 +01:00
Rolf Bjarne Kvinge 40905dd1f7
[msbuild/dotnet] Add a FilterStaticFramework task to filter out frameworks of static libraries from frameworks we copy to the app bundle. (#13551)
A later PR will include a test case for this.
2021-12-16 07:41:53 +01:00
Chris Hamons 4cf12e3623
[msbuild] Teach _StripAssemblyIL task to support inputs with duplicate file names but different paths (#13571)
- Fixes https://github.com/xamarin/xamarin-macios/issues/13526
- F#, along with some other cases, have files to publish that have the same filename but different folder
- The most obvious example being resources assemblies: cs/FSharp.Core.resources.dll vs de/FSharp.Core.resources.dll
- I naively copied all files into one directory ignoring path, which does not work here at all
- DestinationSubPath seems to be set unconditionally by ResolvePackageAssets but #msbuild suggested not assuming it was always there (0fc72ddb75/src/Tasks/Common/ItemUtilities.cs (L126-L128))
- So use DestinationSubPath when it is around, else fall back to the old Filename + Extension
- Since there are now subdirectories inside stripped folder, extend MakeDir to cover all file's Directory path
- Tested by hand with FSharpiOSCoolApp (.NET), I can extend an auto test if desired
2021-12-15 16:35:41 -06:00
Rolf Bjarne Kvinge 69015b3cec
[dotnet] Honor 'TrimMode' to specify linker behavior if LinkMode/MtouchLink aren't set. Fixes #13518. (#13543)
* Change dotnet-linker to only care about whether we're actually trimming anything or not.
* Allow LinkMde/MtouchLink to not be set if TrimMode is set.
* Detect if any assemblies are linked or not by checking the global TrimMode
  property + any TrimMode properties on assemblies.

Fixes https://github.com/xamarin/xamarin-macios/issues/13518.
2021-12-15 09:27:00 +01:00
Marek Safar 462d6286c5
Include recently two more feature switches (#13532)
NullabilityInfoContextSupport - saves a lot by trimming all C# compiler generated nullable information
BuiltInComInteropSupport - no COM support on iOS
2021-12-15 08:17:37 +01:00
Rolf Bjarne Kvinge 342b312a73
Our current behavior is to detect any None, BundleResource or Content item that's (#13550)
named 'Info.plist', and assume that's the app manifest.

That doesn't quite work when we end up with multiple 'Info.plist' entries in any
of those item groups (one example being a framework as a BundleResource - all frameworks
have an Info.plist, and there's no good way to distinguish what the developer's intention
was).

So:

1. Implement a 'AppManifestDetectionEnabled' property to disable automatic app manifest
   detection.

2. Add a public 'AppBundleManifest' property that specifies the app manifest
   (this is just a renamed version of our previously private '_AppManifest' property).

This makes it possible for app developers to:

* Disable automatic app manifest detection.
* Still have an app manifest by specifying it manually.
* Disable automatic app manifest detection, but also not specify an app manifest
  manually (so no custom app manifest at all).

Also:

* Rename '_AppBundleManifest' to '_AppBundleManifestPath' to make it less confusing
  with the new 'AppBundleManifest' property.
2021-12-14 20:56:52 +01:00
Rolf Bjarne Kvinge c85d7721d5
[dotnet] Pass -dead_strip to the native linker when we can. (#13541)
Pass -dead_strip to the native linker like we do for legacy Xamarin:

* If there are no custom linker arguments.
* If all third-party bindings in the app has SmartLink = true (this doesn't
  show up in the PR, but the logic exists for legacy Xamarin and is already
  executed for .NET, the resulting Application.DeadStrip value just wasn't
  taken into account).

This shrinks the app size a bot for a Hello World app:

* Before:     10.659.731 (https://gist.github.com/rolfbjarne/b5892a5c7fb8663d38e2b69f67bce90c)
* After:       9.940.240 (https://gist.github.com/rolfbjarne/8404394180fb9971bd2f1475b747c70a)
* Difference:   -719.491 (-6.7 %)
2021-12-13 20:41:43 +01:00
Rolf Bjarne Kvinge b8e9c61409
[dotnet] Parse the -gcc_flags and -link_flags mtouch/mmp arguments and pass them to the native linker. (#13521) 2021-12-13 08:33:26 +01:00
Marek Safar c3943dbe58
Enable AggressiveAttributeTrimming (#13523)
This enables removing all kinds of infrastructure attributes for example SupportedOSPlatformAttribute (like old XI did).
2021-12-10 08:23:10 +01:00
Rolf Bjarne Kvinge 80dec2841f
[dotnet] Generate an itemgroup with the valid runtime identifiers and use it to detect invalid runtime identifiers. (#13484)
This way we don't have to update the runtime identifier validation when we add
support for new runtime identifiers.

We'll also have an item group that lists the valid runtime identifiers, which
is making it possible (although the item group is currently private) to query
the valid runtime identifiers (which is something the IDEs have expressed
interest in).
2021-12-03 07:57:08 +01:00
Rolf Bjarne Kvinge 6d5aeb1ab3 [dotnet] Fix detecting simulator builds for fat apps. 2021-12-01 22:13:31 +01:00
Rolf Bjarne Kvinge 4b17520a17 [dotnet] Run the AOT compiler for ARM64 bullds for the simulator 2021-11-30 18:20:43 +01:00
Rolf Bjarne Kvinge ac441c1106 [msbuild] Detect SdkIsSimulator better for .NET by using the RuntimeIdentifier instead of only the architecture.
This way we're able to detect that "iossimulator-arm64" is actually a RID for the simulator.
2021-11-30 18:20:43 +01:00
Rolf Bjarne Kvinge c7110dbd42 [dotnet] Add runtime packs. 2021-11-30 18:20:43 +01:00