Repository navigation
Conversation
Preserve reference selection and project precedence while limiting task-cache input discovery to selected files. Keep custom directory arguments uncached and retain linker CLI directory resolution. Assisted-by: GitHub Copilot CLI:Auto Co-authored-by: Copilot <[email protected]> Copilot-Session: cddd017d-74e2-49b6-827b-ccfada96f562
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/illink |
This was referenced Nov 14, 2026
Pass the selected references through ReferenceAssemblyPaths for custom arguments too, removing the remaining -d construction. Remove the test that imported eng/illink.targets; the linker fails on unresolved references, and runtime library builds exercise the targets. Assisted-by: GitHub Copilot CLI:Auto Co-authored-by: Copilot <[email protected]> Copilot-Session: cddd017d-74e2-49b6-827b-ccfada96f562
This was referenced Nov 14, 2026
sbomer
marked this pull request as ready for review
November 20, 2026 18:21
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
IgnoreUnresolved defaults to true, allowing missing dependencies to pass without failing the build; strict dependency validation and a regression test are still needed.
1 open issue
What changed in this PR
This PR switches runtime library trimming to explicit assembly references, narrowing ILLink cache inputs instead of scanning entire search directories.
Changes:
- Pass selected references through
ReferenceAssemblyPaths, keeping project references first. - Remove cache support for
-darguments while preserving uncached execution. - Update tests and documentation for explicit-reference hashing and cache bypass behavior.
Validation was limited to source inspection; no builds or tests were run.
| File | Description |
|---|---|
src/tools/illink/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs |
Tests reference sidecar hashing and search-directory cache bypass. |
src/tools/illink/src/ILLink.Tasks/LinkTask.cs |
Removes search-directory inventory from cache input discovery. |
eng/illink.targets |
Supplies explicit references with project-first ordering. |
docs/tools/illink/illink-tasks.md |
Documents supported cache inputs and -d bypass behavior. |
docs/design/tools/illink/task-cache.md |
Updates the cache design for explicit references. |
Review effort: Balanced
am11
approved these changes
Nov 24, 2026
Member
Author
|
/ba-g "Known failure, fixed by #138062" |
sbomer
enabled auto-merge (squash)
November 25, 2026 00:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Runtime library trimming passes the existing selected reference files to ILLink through
ReferenceAssemblyPathsinstead of turning their directories into-dsearch paths. Reference selection and project-reference precedence remain unchanged. This lets task-cache eligibility track declared reference files and sidecars rather than scan directory contents. Custom extra arguments still run unchanged but are uncached; the linker CLI's-doption remains supported.In the Linux runtime CI build, I compared 114 trim invocations (4,456 explicit references across 116 directories): there were no missing references or directories, unlisted directory candidates, or precedence differences. Modeled lookups for 678 assembly-reference names in the corresponding final runtime artifacts selected the same candidates for explicit-file and directory resolution, including a case-insensitive directory-lookup simulation. This evidence is limited to that Linux artifact, not every platform or the original pre-trim inputs. The local CoreCLR/libraries build was stopped by the host-memory safeguard, so a same-input linker replay was not run.
The ILLink task tests passed on Linux: 371 passed, 0 failed.
The unrelated Windows NET481
CS2012generator-output race has since been fixed onmain: #138062.Note
This content was created with assistance from GitHub Copilot.