Skip to content

Fix ARM64-based CPU detection logic; take #3. - #5683

Merged
rolfbjarne merged 1 commit into
dotnet:masterfrom
rolfbjarne:arm64-detection-take-3
Feb 28, 2019
Merged

Fix ARM64-based CPU detection logic; take #3.#5683
rolfbjarne merged 1 commit into
dotnet:masterfrom
rolfbjarne:arm64-detection-take-3

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

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.

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.
@monojenkins

Copy link
Copy Markdown
Contributor

Build failure
Build succeeded
API Diff (from stable)
🔥 Failed to compare API and create generator diff 🔥
    Failed to update apidiff references
    Search for Comparing API & creating generator diff in the log to view the complete log.
Test run succeeded

@spouliot spouliot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did that fail an existing* unit test ? or did you found it in another way/failure ?

  • If not then maybe one should be added

@rolfbjarne

Copy link
Copy Markdown
Member Author

Did that fail an existing* unit test ?

Kind of: monotouch-test started crashing when I put the previous fix in the branch with my other arm64_32 changes (PR #5465).

@rolfbjarne

Copy link
Copy Markdown
Member Author

API diff failure is due to https://github.com/xamarin/maccore/issues/1452

@rolfbjarne
rolfbjarne merged commit 564628a into dotnet:master Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants