Skip to content

stdlib: check for ARM/ARM64 more thoroughly (NFC) #19462

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

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

compnerd
Copy link
Member

Update the instances of checks for architectures to be more broad for different
spellings of the architecture macro. Certain targets use _M_ARM and others
use __arm__. Similarly, arm64/aarch64 has _M_ARM64, __arm64__ and
__aarch64__ as spellings. This just mechanically goes through and encodes the
various spellings.

Take the opportunity to replace some raw checks with defined checks which
avoids a pedantic warning due to the undefined macro when performing the check
as the preprocessor may warn about an undefined condition evaluating to 0.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Update the instances of checks for architectures to be more broad for different
spellings of the architecture macro.  Certain targets use `_M_ARM` and others
use `__arm__`.  Similarly, arm64/aarch64 has `_M_ARM64`, `__arm64__` and
`__aarch64__` as spellings.  This just mechanically goes through and encodes the
various spellings.

Take the opportunity to replace some raw checks with `defined` checks which
avoids a pedantic warning due to the undefined macro when performing the check
as the preprocessor may warn about an undefined condition evaluating to `0`.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd compnerd merged commit f9af5cb into swiftlang:master Sep 21, 2018
@compnerd compnerd deleted the what-is-in-a-name branch September 21, 2018 21:19
@futurejones
Copy link
Contributor

@compnerd @jrose-apple can we get these changes pushed to the swift-4.2-branch or do we need to submit a new PR?

@compnerd
Copy link
Member Author

@futurejones it is going to need a new PR that cherry-picks it over. I don't think that any more releases are planned off of 4.2, so I'm not sure if we should pull this into that branch.

@futurejones
Copy link
Contributor

@compnerd It doesn't matter whether there are any more releases planned of 4.2. This is blocking successful builds of 4.2 for AArch64 on the Swift Community CI. So we still need these changes pulled to the swift-4.2-branch. I will upload a new PR for this shortly.

@futurejones
Copy link
Contributor

@compnerd new PR is here - #20709

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.

2 participants