Skip to content

Conversation

@AntonLapounov
Copy link
Member

@AntonLapounov AntonLapounov commented Mar 24, 2021

The Microsoft.NETCore.App.Runtime.win-arm package ships x86 and ARM versions of crossgen.exe, which require the corresponding versions of the Microsoft.DiaSymReader.Native.*.dll library. While .NET Core 3.1 and .NET 5 releases contained three different architectures for the DiaSymReader library (x86, amd64, and arm), changes made in .NET 6 caused to ship only the architecture used for cross-compilation, i.e. x86. PR #49739 replaced it with the native architecture (arm), which fixed the native compilation scenario, but broke the cross-architecture compilation scenario.

This PR returns Microsoft.DiaSymReader.Native.x86.dll to the win-arm package; however, this time it is placed in the runtimes\x86_arm\native directory for cross-compilation libraries rather than the runtimes\win-arm\native directory for native libraries.

Below is the list of DiaSymReader library architectures shipped with different versions of the win-arm package. All package versions contain ARM-hosted crossgen.exe in the tools directory and x86-hosted crossgen.exe in the tools\x86_arm directory.

  • v5.0.4 and earlier: x86, amd64, and arm (amd64 is not needed) in the runtimes\win-arm\native directory.
  • v6.0.0-preview.1 and preview.2: x86 in the runtimes\win-arm\native directory.
  • Unofficial v6.0.0-preview.3 builds after Update Microsoft.DiaSymReader.Native package #49739: arm in the runtimes\win-arm\native directory.
  • With this PR: arm in the runtimes\win-arm\native directory and x86 in the runtimes\x86_arm\native directory.

Everything said above also applies to the win-arm64 package, which ships x64 and ARM64 versions of crossgen.exe. While .NET 5 releases contained three different architectures for the DiaSymReader library (x86, amd64, and arm, but no arm64), changes made in .NET 6 caused to ship only the architecture used for cross-compilation, i.e. amd64. PR #49739 replaced it with the native architecture (arm64), which fixed the native compilation scenario (together with the ceeload.h fix in this PR), but broke the cross-architecture compilation scenario.

This PR returns Microsoft.DiaSymReader.Native.amd64.dll to the win-arm64 package; however, this time it is placed in the runtimes\x64_arm64\native directory for cross-compilation libraries rather than the runtimes\win-arm64\native directory for native libraries.

Below is the list of DiaSymReader library architectures shipped with different versions of the win-arm64 package. All package versions contain ARM64-hosted crossgen.exe in the tools directory and x64-hosted crossgen.exe in the tools\x64_arm64 directory.

  • v5.0.4 and earlier: x86, amd64, and arm (x86 is not needed) in the runtimes\win-arm64\native directory.
  • v6.0.0-preview.1 and preview.2: amd64 in the runtimes\win-arm64\native directory.
  • Unofficial v6.0.0-preview.3 builds after Update Microsoft.DiaSymReader.Native package #49739: arm64 in the runtimes\win-arm64\native directory.
  • With this PR: arm64 in the runtimes\win-arm64\native directory and amd64 in the runtimes\x64_arm64\native directory.

@ghost
Copy link

ghost commented Mar 24, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this!

@AntonLapounov AntonLapounov merged commit 20e1724 into dotnet:main Mar 24, 2021
@AntonLapounov AntonLapounov deleted the AddCrossDiaSymReaderToPackage branch March 24, 2021 07:23
@AntonLapounov AntonLapounov changed the title Put back DiaSymReader library for cross-arch crossgen to package Return DiaSymReader library for cross-arch crossgen to Runtime package Mar 24, 2021
AntonLapounov added a commit to AntonLapounov/runtime that referenced this pull request Mar 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants