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

Allow building libs against NativeAOT CoreLib #62945

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Dec 17, 2021

To make sure ApiCompat tooling for NativeAOT's CoreLib runs at least in some legs, compile libs against NativeAOT CoreLib if we're building CLR, but not building the JIT flavor of the runtime.

The baselining is necessary because the reflection stack of NativeAOT doesn't live in CoreLib.

The CannotRemoveBaseTypeOrInteface baselining will go away once #62944 gets fixed. It's one of the "overall goodness" things we can take out of NativeAOT and put it into all runtimes.

To make sure ApiCompat tooling runs at least in some legs, compile libs against NativeAOT corelib if we're building CLR, but not building the JIT flavor of the runtime.

The baselining is necessary because the reflection stack of NativeAOT doesn't live in CoreLib.

The CannotRemoveBaseTypeOrInteface baselining will go away once we fix dotnet#62944. It's one of the "overall goodness" things we can take out of NativeAOT and put it into all runtimes.
@ghost
Copy link

ghost commented Dec 17, 2021

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

To make sure ApiCompat tooling for NativeAOT's CoreLib runs at least in some legs, compile libs against NativeAOT CoreLib if we're building CLR, but not building the JIT flavor of the runtime.

The baselining is necessary because the reflection stack of NativeAOT doesn't live in CoreLib.

The CannotRemoveBaseTypeOrInteface baselining will go away once we fix #62944. It's one of the "overall goodness" things we can take out of NativeAOT and put it into all runtimes.

Author: MichalStrehovsky
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@ghost ghost added this to In Progress in Infrastructure Backlog Dec 17, 2021
@jkoritzinsky
Copy link
Member

Has there been any thought to implementing this with a new value for RuntimeFlavor instead? That way we can plumb through NativeAOT-specific paths in our infra using similar mechanisms to how we switch between CoreCLR and Mono.

@MichalStrehovsky
Copy link
Member Author

Has there been any thought to implementing this with a new value for RuntimeFlavor instead? That way we can plumb through NativeAOT-specific paths in our infra using similar mechanisms to how we switch between CoreCLR and Mono.

I'm not sure RuntimeFlavor is the right axis - we probably want to take the CoreCLR paths most of the time - it's more like a RuntimeVariant - but only Mono defines RuntimeVariants right now.

On CoreCLR we have R2R/non-R2R axis for testing that doesn't affect product build. If we need more of these special casings we can take a step back, but this might be the only special casing we need. It's possible that at some point around .NET 8 we'll have a single universal CoreLib that works for both CoreCLR-JIT and CoreCLR-NativeAOT. We already started unification of internal details in that direction (e.g. we started renaming NativeAOT's EEType in CoreLib to the nonsensical MethodTable because that's how data structure describing a type is named there and the name has been leaked out into places like SOS. The structures are pretty similar, to the extent that CoreLib is concerned).

@MichalStrehovsky MichalStrehovsky merged commit 3b2a700 into dotnet:main Dec 18, 2021
Infrastructure Backlog automation moved this from In Progress to Done Dec 18, 2021
@MichalStrehovsky MichalStrehovsky deleted the naotcorelib branch December 18, 2021 05:13
@ghost ghost locked as resolved and limited conversation to collaborators Jan 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants