Skip to content

Enable ILLink for all library configurations #47424

Open
@ericstj

Description

@ericstj

Copying from #45665

The suggestion was made to run the ILLinker to trim dead code from all libraries, not just those libraries that make up the shared framework. Here's an excerpt of the discussion.

It was a scoping decision back when we first added it. Folks weren't willing to test the output of things that weren't going in the shared framework (eg: UAP assemblies, packages that would be used by desktop, etc) so we constrained it to only the shared framework. Folks were confident that we had better test coverage of the shared framework since that's what we were shipping at the time. We could broaden that scope but we'd probably want to make sure such a change had decent test coverage + auditing of the new assemblies it touched across all their supported frameworks.

This still applies, we don't test all package configurations. I think the linker is much more stable now and we could enable it. I think when doing so we'd want to audit what it does to non-tested configurations. That could be done with Assembly diffing. If the changes the linker made matched those made to the netcoreapp build we could be reasonably confident that the netcoreapp build would remain a good proxy for the downlevel builds. If we noticed any significant differences we could do targeted testing / investigation to ensure we have correct linker configurations for those configurations. This will also enable the linker on completely OOB assemblies where it never ran before (CodeDom, System.Management, MEF, etc) and where we haven't invested in test coverage. We'd want to do some manual diffing of these to validate that removals are safe, potentially adding test coverage to touch impacted codepaths.

Do folks think this effort is worth the cost?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions