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

Commits on Jun 21, 2023

  1. Configuration menu
    Copy the full SHA
    d605221 View commit details
    Browse the repository at this point in the history
  2. [runtime] Create a version of our runtime that can be used with Nativ…

    …eAOT.
    
    This contributes towards xamarin#17339.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    f964b5a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a766901 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7f15d86 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d584840 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    607cc78 View commit details
    Browse the repository at this point in the history
  7. [Foundation] Use the correct toggle ref implementation on !macOS sinc…

    …e NativeAOT (aka CoreCLR) is a possibility now
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    ca6f2e4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    94c96ec View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a3b466b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ab8f928 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    60e4936 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9b24c5d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d5a53d6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b4a67c6 View commit details
    Browse the repository at this point in the history
  15. [dotnet] Set AutoreleasePoolSupport earlier so that the linker doesn'…

    …t set it first.
    
    Might not be necessary: dotnet/runtime#86753
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    e0e4b77 View commit details
    Browse the repository at this point in the history
  16. [ObjCRuntime] Avoid using Assembly.Location for NativeAOT, use an alt…

    …ernative implementation instead.
    
    The Runtime.GetAssemblyLocation method is only used for diagnostic purposes, so the
    exact value returned doesn't matter all that much, as long as it makes sense.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    901be39 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3105214 View commit details
    Browse the repository at this point in the history
  18. [tests] Adjust RegistrarTest to always expected the dynamic registrar…

    … to be removed for NativeAOT
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    5b8d60b View commit details
    Browse the repository at this point in the history
  19. [tests] Adjust asserts since some collection assert doesn't work with…

    … NativeAOT.
    
    Rewrite a few asserts, since NUnitLite isn't actually trimmer-safe, and some collection
    asserts don't work with NativeAOT.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    890d3ca View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    0db2c5c View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    595bcdb View commit details
    Browse the repository at this point in the history
  22. [dotnet] Disable our own IL stripping when using NativeAOT, because N…

    …ativeAOT already does something equivalent
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    13fa769 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    b36db05 View commit details
    Browse the repository at this point in the history
  24. [dotnet] Adjust ILC's build dependencies to cope with the fact that I…

    …LC doesn't support executing after ILLink.
    
    Currently, NativeAOT is implemented as a replacement (of sorts) for ILLink. However,
    we need to execute both, and in order to do that, we force our own logic to execute
    to determine what ILC does.
    
    This might be improved in the future. Ref: dotnet/runtime#87187.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    00b2865 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    8cfee8b View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    6bd8915 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    3977493 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    79b7657 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    c48d583 View commit details
    Browse the repository at this point in the history
  30. [dotnet] Collect all the native linker arguments ILC would have used …

    …and use them ourselves.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    2ee5326 View commit details
    Browse the repository at this point in the history
  31. [dotnet] Enforce that the linker must be enabled for all assemblies w…

    …hen using NativeAOT (and warn if someone asks otherwise).
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    617f64e View commit details
    Browse the repository at this point in the history
  32. [dotnet] Set PublishAotUsingRuntimePack=true when using NativeAOT to …

    …get the correct BCL libraries.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    d601e51 View commit details
    Browse the repository at this point in the history
  33. [dotnet] Use a different min OS version when building with NativeAOT.

    This is because NativeAOT contains swift code, and we'd have to add code to
    embed the Swift libraries in any apps that target early OS versions. We could
    eventually implement this, but let's wait and see if there's a demand first.
    rolfbjarne committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    183c76a View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    e3228d0 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Configuration menu
    Copy the full SHA
    a1d707c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0adbf77 View commit details
    Browse the repository at this point in the history
  3. [dotnet/tests] Only use NativeAOT when publishing.

    This matches how NativeAOT works for other platforms.
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    7d65804 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    97b91f1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c49888b View commit details
    Browse the repository at this point in the history
  6. [dotnet] Disable SelfContained for the outer build of a universal app…

    … build when using NativeAOT.
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    264be70 View commit details
    Browse the repository at this point in the history
  7. [tests] Disable the NUnitLite and Touch.Unit references for the .NET …

    …7 tests.
    
    We had to bump NUnitLite and Touch.Unit's TargetFramework properties to
    net8.0-* (otherwise projects using NativeAOT fails if these projects are
    referenced), which means they can't be used from .NET 7 (aka our .NET 7
    tests).
    
    So just don't reference NUnitLite and Touch.Unit in this test.
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    8ac35ba View commit details
    Browse the repository at this point in the history
  8. [xharness] Disable NativeAOT test variations for macOS for now, we're…

    … waiting for a dotnet/runtime fix.
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    e31b0a6 View commit details
    Browse the repository at this point in the history
  9. [xharness] Disable NativeAOT test variations for Mac Catalyst for now…

    …, we need a few upstream fixes.
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    94cdec2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    42d6121 View commit details
    Browse the repository at this point in the history
  11. [dotnet] Treat the ICU data file as a resource instead of an assembly.

    We can fix this better once this fix reaches us:
    
        dotnet/runtime#87813
    
    because then we can set the ICU data file at build time (to a relative path).
    rolfbjarne committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    3c912d7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b4e3361 View commit details
    Browse the repository at this point in the history