-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add public Architecture enum value for s390x #52909
Comments
@terrajobst this should be a quick one for API review. |
Also there is System.Reflection.ProcessorArchitecture. |
Looks good as proposed namespace System.Runtime.InteropServices
{
public enum Architecture
{
X86,
X64,
Arm,
Arm64,
Wasm,
+ S390x,
}
} |
This is related to the assembly file format, right? We currently don't have a processor-specific file format since we don't (yet) support AOT. Once we add support for that, I guess we'd have to allocate a new System.Reflection.ProcessorArchitecture (as well as System.Reflection.ImageFileMachine I think). I'll create a new API issue for those when we get there. |
It is for architecture specific assemblies that are really only a thing on Windows. AOT should not require it. |
Fixed by #52906 |
Thanks for the clarification! |
Background and Motivation
We are in the processes of adding support for Linux on the IBM Z architecture (s390x-ibm-linux) to .NET. As part of this effort, the
System.Runtime.InteropServices.Architecture
enum needs to be extended by a new value to refer to this architecture.Proposed API
namespace System.Runtime.InteropServices { public enum Architecture { X86, X64, Arm, Arm64, Wasm, + S390x, } }
Full implementation is provided here: #52906
Usage Examples
Code can use the existing properties
System.Runtime.InteropServices.OSArchitecture
andSystem.Runtime.InteropServices.ProcessArchitecture
, which will now return the new value when running on the IBM Z architecture.Alternative Designs
n/a
Risks
There may be existing code that uses
System.Runtime.InteropServices.OSArchitecture
andSystem.Runtime.InteropServices.ProcessArchitecture
but does not expect any new return value and will fail if it is returned. I've seen one example of such code in vstest. Such code would have to be updated.The text was updated successfully, but these errors were encountered: