-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPC: Set PlatformType property to arm64 instead of AnyCPU for arm64 builds #84424
Comments
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsWe're setting AnyCPU as the PlatformTarget for corelib here (in all runtimes):
Roslyn gained support for setting arm64 as a platform in dotnet/roslyn@e65a6c5 about 5 years ago. I traced git history and it looks like the AnyCPU value for arm64 has been there from the beginning of coreclr being open-sourced 9 years ago so it was never updated. I don't know exactly what the impact of changing this would be but thought I'd bring it up for discussion. /cc @jkotas @vitek-karas
|
Processor architecture on assembly identities is obsolete concept. Properties returning this enum are marked obsolete. We are not adding new architectures to The processor architecture on CoreLib is set just for compatibility with .NET Framework. There are (obsolete) APIs that return it. If we were to set processor architecture on CoreLib for Arm64, we would need to revisit the whole thing - add the Arm64 member to the obsolete ProcessorArchitecture, fix all obsolete APIs that deal with it to handle it, etc. Not worth it. It can easily break more things than it would fix. |
Duplicate of #58970 |
I wasn't thinking about changing the runtime/src/coreclr/System.Private.CoreLib/src/System/Reflection/AssemblyName.CoreCLR.cs Lines 142 to 144 in 657865f
I stumbled over this due to dotnet/cecil#60 which uses code like this: var pe64 = module.Architecture == TargetArchitecture.AMD64 ||
module.Architecture == TargetArchitecture.IA64 ||
module.Architecture == TargetArchitecture.ARM64; Vitek said it looks weird that we don't set PlatformTarget for ARM64 so I thought I'd better ask 😄 |
This code does not look right to me: dotnet/cecil#60 (comment) |
We're setting AnyCPU as the PlatformTarget for corelib here (in all runtimes):
runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
Lines 75 to 76 in 657865f
Roslyn gained support for setting arm64 as a platform in dotnet/roslyn@e65a6c5 about 5 years ago. I traced git history and it looks like the AnyCPU value for arm64 has been there from the beginning of coreclr being open-sourced 9 years ago so it was never updated.
I don't know exactly what the impact of changing this would be but thought I'd bring it up for discussion.
/cc @jkotas @vitek-karas
The text was updated successfully, but these errors were encountered: