Fix ARM64-based CPU detection logic; take #3. - #5683
Merged
Conversation
The previous implementation was broken, because: * We called GetIsARM64CallingConvention in Runtime's static constructor. * Runtime.Arch hadn't been set yet in the static constructor, which means it was Arch.DEVICE (0). * This meant GetIsARM64CallingConvention would return true on iOS/tvOS x86-64 simulator. So delay the initialization of the IsARM64CallingConvention field until we've been initialized.
Contributor
|
Build failure |
spouliot
approved these changes
Feb 28, 2019
spouliot
left a comment
Contributor
There was a problem hiding this comment.
Did that fail an existing* unit test ? or did you found it in another way/failure ?
- If not then maybe one should be added
Member
Author
Kind of: monotouch-test started crashing when I put the previous fix in the branch with my other arm64_32 changes (PR #5465). |
Member
Author
|
API diff failure is due to https://github.com/xamarin/maccore/issues/1452 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous implementation was broken, because:
was Arch.DEVICE (0).
simulator.
So delay the initialization of the IsARM64CallingConvention field until we've
been initialized.