Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using NativeAOT. #17374

Merged
merged 46 commits into from
Jun 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d605221
Bump MonoTouch.Dialog and Touch.Unit.
rolfbjarne Jun 21, 2023
f964b5a
[runtime] Create a version of our runtime that can be used with Nativ…
rolfbjarne Jun 21, 2023
a766901
[dotnet] Choose the correct runtime library depending on which runtim…
rolfbjarne Jun 21, 2023
7f15d86
[xharness] Add a NativeAOT variation of monotouch-test.
rolfbjarne Jun 21, 2023
d584840
[dotnet] Force the managed static registrar when using NativeAot.
rolfbjarne Jun 21, 2023
607cc78
[dotnet] Use the correct package infix for NativeAOT
rolfbjarne Jun 21, 2023
ca6f2e4
[Foundation] Use the correct toggle ref implementation on !macOS sinc…
rolfbjarne Jun 21, 2023
94c96ec
[dotnet] Don't run Mono's AOT compiler if we're using NativeAOT.
rolfbjarne Jun 21, 2023
a3b466b
[tools] Don't allow keeping the dynamic registrar when using NativeAOT.
rolfbjarne Jun 21, 2023
ab8f928
[tools] Don't call mono_jit_set_aot_mode from main when using NativeAOT
rolfbjarne Jun 21, 2023
60e4936
[tools] Don't generate calls to mono_aot_register_module in main when…
rolfbjarne Jun 21, 2023
9b24c5d
[runtime] NativeAOT does not support dynamic registration
rolfbjarne Jun 21, 2023
d5a53d6
[runtime] Add a native IsNativeAOT flag.
rolfbjarne Jun 21, 2023
b4a67c6
[src] Make the Runtime.IsNativeAOT property a constant in the linker.
rolfbjarne Jun 21, 2023
e0e4b77
[dotnet] Set AutoreleasePoolSupport earlier so that the linker doesn'…
rolfbjarne Jun 21, 2023
901be39
[ObjCRuntime] Avoid using Assembly.Location for NativeAOT, use an alt…
rolfbjarne Jun 21, 2023
3105214
[tests] Detect NativeAOT correctly in the Symbols test
rolfbjarne Jun 21, 2023
5b8d60b
[tests] Adjust RegistrarTest to always expected the dynamic registrar…
rolfbjarne Jun 21, 2023
890d3ca
[tests] Adjust asserts since some collection assert doesn't work with…
rolfbjarne Jun 21, 2023
0db2c5c
[dotnet] Rework feature detection and notification a bit.
rolfbjarne Jun 21, 2023
595bcdb
[dotnet] Don't call ComputeResolvedFilesToPublishList when using Nati…
rolfbjarne Jun 21, 2023
13fa769
[dotnet] Disable our own IL stripping when using NativeAOT, because N…
rolfbjarne Jun 21, 2023
b36db05
[dotnet] Call ILC, the NativeAOT compiler, before we link the native …
rolfbjarne Jun 21, 2023
00b2865
[dotnet] Adjust ILC's build dependencies to cope with the fact that I…
rolfbjarne Jun 21, 2023
8cfee8b
[dotnet] Ask ILC to treat all P/Invokes to __Internal as direct P/Inv…
rolfbjarne Jun 21, 2023
6bd8915
[dotnet] Rearrange items in item groups so that ILC gets the output f…
rolfbjarne Jun 21, 2023
3977493
[dotnet] Ask ILC to process all unmanaged callers only methods from a…
rolfbjarne Jun 21, 2023
79b7657
[dotnet] Ask ILC to only trim assemblies if trimming is explicitly en…
rolfbjarne Jun 21, 2023
c48d583
[dotnet] Link the output from ILC into the native executable
rolfbjarne Jun 21, 2023
2ee5326
[dotnet] Collect all the native linker arguments ILC would have used …
rolfbjarne Jun 21, 2023
617f64e
[dotnet] Enforce that the linker must be enabled for all assemblies w…
rolfbjarne Jun 21, 2023
d601e51
[dotnet] Set PublishAotUsingRuntimePack=true when using NativeAOT to …
rolfbjarne Jun 21, 2023
183c76a
[dotnet] Use a different min OS version when building with NativeAOT.
rolfbjarne Jun 21, 2023
e3228d0
[dotnet] Turn off some publishing behavior we don't need
rolfbjarne Jun 21, 2023
a1d707c
[dotnet] Fix items in TrimmerRootAssembly to follow docs and what ILC…
rolfbjarne Jun 21, 2023
0adbf77
[tests] Fix computing when the dynamic registrar is used.
rolfbjarne Jun 21, 2023
7d65804
[dotnet/tests] Only use NativeAOT when publishing.
rolfbjarne Jun 21, 2023
97b91f1
[dotnet] Remove libSystem.Net.Security.Native from tvOS builds when u…
rolfbjarne Jun 21, 2023
c49888b
[tests] Adjust ConfigTest to cope with different behavior when using …
rolfbjarne Jun 21, 2023
264be70
[dotnet] Disable SelfContained for the outer build of a universal app…
rolfbjarne Jun 21, 2023
8ac35ba
[tests] Disable the NUnitLite and Touch.Unit references for the .NET …
rolfbjarne Jun 21, 2023
e31b0a6
[xharness] Disable NativeAOT test variations for macOS for now, we're…
rolfbjarne Jun 21, 2023
94cdec2
[xharness] Disable NativeAOT test variations for Mac Catalyst for now…
rolfbjarne Jun 21, 2023
42d6121
[dotnet] Set a flag to avoid a bug with the NativeAOT compiler
rolfbjarne Jun 21, 2023
3c912d7
[dotnet] Treat the ICU data file as a resource instead of an assembly.
rolfbjarne Jun 21, 2023
b4e3361
[dotnet] Tell ILC about any satellite assemblies.
rolfbjarne Jun 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[dotnet] Disable SelfContained for the outer build of a universal app…
… build when using NativeAOT.
rolfbjarne committed Jun 22, 2023

Partially verified

This commit is signed with the committer’s verified signature.
gsmet’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
commit 264be7055e0c83d14e9ff8509c28c151d05f070a
14 changes: 14 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.props
Original file line number Diff line number Diff line change
@@ -102,6 +102,20 @@
<SelfContained>true</SelfContained>
</PropertyGroup>

<!--
SelfContained is automatically enabled if PublishAot is true, and that
doesn't work properly (restore fails because RuntimeIdentifier is not
set) when doing the outer build of a universal apps (when
RuntimeIdentifier=''), so manually disable SelfContained in that case.
This might not be necessary after: https://github.com/dotnet/sdk/pull/33229
-->
<PropertyGroup Condition="'$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true' And '$(RuntimeIdentifiers)' != '' And '$(RuntimeIdentifier)' == '' And '$(SelfContained)' == ''">
<SelfContained>false</SelfContained>
</PropertyGroup>

<!--
Enable LLVM by default for mobile release builds.