Skip to content

Configure illink task to trim unreachable platform-specific code  #31785

@jkotas

Description

@jkotas

IL linker is capable of constant propagation and dead code removal (see dotnet/linker#848).

We should configure linking for the runtime package to eliminate platform-specific unreachable code that is under conditions like:

  • IntPtr.Size, sizeof(IntPtr)
  • BitConverter.IsLittleEndian
  • hardware intrinsics IsSupported methods
  • System.Runtime.InteropService.OSPlatform

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions