Skip to content

[wasm] Use locally built ILLink.Tasks with WBT - #93629

Closed
radical wants to merge 7 commits into
dotnet:mainfrom
radical:patch-illink-ref
Closed

radical wants to merge 7 commits into
dotnet:mainfrom
radical:patch-illink-ref

Conversation

@radical

@radical radical commented Oct 17, 2023

Copy link
Copy Markdown
Member

No description provided.

@ghost ghost added the area-Build-mono label Oct 17, 2023
@ghost ghost assigned radical Oct 17, 2023
@radical radical added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it arch-wasm WebAssembly architecture area-Infrastructure-mono and removed area-Build-mono labels Oct 17, 2023
@ghost

ghost commented Oct 17, 2023

Copy link
Copy Markdown

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: radical
Assignees: radical
Labels:

NO-MERGE, NO-REVIEW, arch-wasm, area-Infrastructure-mono

Milestone: -

Comment on lines +6 to +10
<Target Name="_OverrideILLinkPack" BeforeTargets="ProcessFrameworkReferences">
<ItemGroup>
<KnownILLinkPack Update="Microsoft.NET.ILLink.Tasks" Condition="%(KnownILLinkPack.TargetFramework) == 'net8.0'" ILLinkPackVersion="$(_RuntimePackInWorkloadVersionCurrent)" />
</ItemGroup>
</Target>

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.

cc @sbomer. We already have logic to consume the live illink pack: https://github.com/dotnet/runtime/blob/main/eng/liveILLink.targets

Why do we need this duplication?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is for Wasm.Build.Tests which run in a special way on helix:

  • Use a sdk with wasm-tools workload installed
  • The installed workload packs are from locally built nugets (thus the sdk will have binaries from artifacts)
  • then each test creates a project, and builds it using that sdk
  • So, we can't directly depend on artifacts/, or liveILLink.targets

The problem being solved here is that the workload itself does not contain the version for ILLink.tasks, the sdk does. So, for these tests you end up with sdk which uses the linker tasks from the nuget version specified in the sdk itself, and not the built nugets.
And to solve that we build the nuget for illink.tasks (with a version like 9.0.0-ci) and then edit the version for KnownILLinkPack, allowing rest of the build to run normally like it would for a user project.

@radical

radical commented Oct 18, 2023

Copy link
Copy Markdown
Member Author
 App: /root/helix/work/workitem/e/wbt/nuget/52cjianm_zti/microsoft.net.illink.tasks/9.0.0-ci/tools/net8.0/illink.dll
[]   Architecture: x64
[]   Framework: 'Microsoft.NETCore.App', version '9.0.0-ci' (x64)
[]   .NET location: /root/helix/work/workitem/e/dotnet-latest/
[]

[]   The following frameworks were found:
[]     8.0.0-rc.2.23457.7 at [/root/helix/work/workitem/e/dotnet-latest/shared/Microsoft.NETCore.App]
[]     9.0.0-alpha.1.23470.17 at [/root/helix/work/workitem/e/dotnet-latest/shared/Microsoft.NETCore.App]
[]

sigh! :/

@sbomer

sbomer commented Oct 18, 2023

Copy link
Copy Markdown
Member

I think you're hitting the behavior described in #90197 - the ILLink.Tasks package has to depend on the runtime version being built, but to use live bits illink needs to be able to run on the current SDK that we're building with.

How do you handle this versioning problem for the workload packs? Are those just always compatible with the current SDK? What happens if a workload pack contains tools that request an n-1 runtime - can they pick an older SDK like we saw in #90015?

@ghost

ghost commented Nov 17, 2023

Copy link
Copy Markdown

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost closed this Nov 17, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 18, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Infrastructure-mono NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants