Skip to content

[build] produce multiple "flavors" of runtime packs - #9538

Merged
jonpryor merged 3 commits into
mainfrom
dev/peppers/runtime/flavors
Nov 26, 2024
Merged

[build] produce multiple "flavors" of runtime packs#9538
jonpryor merged 3 commits into
mainfrom
dev/peppers/runtime/flavors

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Right now our runtime packs are all identical for each .NET "runtime", but we want to be able to produce different packs, such as:

Microsoft.Android.Runtime.Mono.35.android-arm
Microsoft.Android.Runtime.Mono.35.android-arm64
Microsoft.Android.Runtime.Mono.35.android-x86
Microsoft.Android.Runtime.Mono.35.android-x64
Microsoft.Android.Runtime.NativeAOT.35.android-arm
Microsoft.Android.Runtime.NativeAOT.35.android-arm64
Microsoft.Android.Runtime.NativeAOT.35.android-x86
Microsoft.Android.Runtime.NativeAOT.35.android-x64

Currently, the contents of all these packs are identical, but this is an initial step to build multiple packs.

The plan is for the workload to only install the "Mono" packs, and the "NativeAOT" packs can be restored via NuGet.

Right now our runtime packs are all identical for each .NET "runtime",
but we want to be able to produce different packs, such as:
Microsoft.Android.Runtime.Mono.35.android-arm
Microsoft.Android.Runtime.Mono.35.android-arm64
Microsoft.Android.Runtime.Mono.35.android-x86
Microsoft.Android.Runtime.Mono.35.android-x64
Microsoft.Android.Runtime.NativeAOT.35.android-arm
Microsoft.Android.Runtime.NativeAOT.35.android-arm64
Microsoft.Android.Runtime.NativeAOT.35.android-x86
Microsoft.Android.Runtime.NativeAOT.35.android-x64
Currently, the contents of all these packs are identical, but this is
an initial step to build multiple packs.
The plan is for the workload to only install the "Mono" packs, and the
"NativeAOT" packs can be restored via NuGet.
@jonathanpeppers
jonathanpeppers marked this pull request as ready for review November 21, 2024 22:03
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

I think the main question here is if we are ok with the new naming scheme:

  • Microsoft.Android.Runtime.Mono.35.[RID]
  • Microsoft.Android.Runtime.NativeAOT.35.[RID]

@pjcollinspjcollins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach and names seem good to me here, we can always rename if we come up with something better later

@jonpryor
jonpryor merged commit 38e8857 into mainNov 26, 2024
@jonpryor
jonpryor deleted the dev/peppers/runtime/flavors branch November 26, 2024 18:38
jonathanpeppers added a commit that referenced this pull request Dec 6, 2024
Context: #9538
Context: #9583
Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.
* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.
* Exclude our Mono-related native libraries from NativeAOT runtime
packs.
* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
etc.) to the appropriate NativeAOT-related directories.
* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
`WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 6, 2024
Context: #9538
Context: #9583
Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.
* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.
* Exclude our Mono-related native libraries from NativeAOT runtime
packs.
* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
etc.) to the appropriate NativeAOT-related directories.
* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
`WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 9, 2024
Context: #9538
Context: #9583
Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.
* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.
* Exclude our Mono-related native libraries from NativeAOT runtime
packs.
* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
etc.) to the appropriate NativeAOT-related directories.
* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
`WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 9, 2024
Context: #9538
Context: #9583
Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.
* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.
* Exclude our Mono-related native libraries from NativeAOT runtime
packs.
* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
etc.) to the appropriate NativeAOT-related directories.
* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
`WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
version number for them. They can still restore via NuGet.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Dec 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@pjcollins@jonpryor