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

Choose KnownILCompilerPacks based on TFM + RID #31398

Closed
wants to merge 1 commit into from

Conversation

kant2002
Copy link

Right now appropriate ILCompiler pack selected purely based on TFM. To relatively easy support of NativeAOT LLVM I would like that selection of ILCompiler pack happens on pair TFM + RID.

That allow adding custom ILC (as in case NativeAOT LLVM) using following code in the project file (only)

<KnownILCompilerPack Include="Microsoft.DotNet.ILCompiler.LLVM"
   TargetFramework="net7.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler.LLVM" ILCompilerPackVersion="8.0.0" ILCompilerRuntimeIdentifiers="browser-wasm" />

As you see it allows indication of the supported "browser-wasm" RID without disrupting other RID targets. Right now it's possible to have workaround like this

<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler"
   TargetFramework="net7.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler.LLVM" ILCompilerPackVersion="8.0.0-alpha.1.23172.3" ILCompilerRuntimeIdentifiers="browser-wasm;linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm;win-arm64;win-x86" />

but with appearace of .NET 8 which has 2 KnownILCompilerPack entry that become problematic and implicit package referencing logic rely on item identity.

Right now appropriate ILCompiler pack selected purely based on TFM.
To relatively easy support of NativeAOT LLVM I would like that selection of ILCompiler pack happens on pair TFM + RID.

That allow adding custom ILC (as in case NativeAOT LLVM) using following code in the project file (only)
```
<KnownILCompilerPack Include="Microsoft.DotNet.ILCompiler.LLVM"
   TargetFramework="net7.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler.LLVM" ILCompilerPackVersion="8.0.0" ILCompilerRuntimeIdentifiers="browser-wasm" />
```
As you see it allows indication of the supported "browser-wasm" RID without disrupting other RID targets.
Right now it's possible to have workaround like this
```
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler"
   TargetFramework="net7.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler.LLVM" ILCompilerPackVersion="8.0.0-alpha.1.23172.3" ILCompilerRuntimeIdentifiers="browser-wasm;linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm;win-arm64;win-x86" />
```
but with appearace of .NET 8 which has 2 KnownILCompilerPack entry that become problematic and implicit package referencing logic rely on item identity.
@lewing
Copy link
Member

lewing commented Apr 15, 2023

can this be closed now?

@kant2002 kant2002 closed this Apr 15, 2023
@kant2002
Copy link
Author

Technically I think that was sensible change anyway, but if that bring some complexity to SDK, I have no case for that now.

@lewing
Copy link
Member

lewing commented Apr 15, 2023

I'm sure it will come up again just trying to keep things tidy at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ReadyToRun untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants