Skip to content
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 arm64 support for M1 Mac #213

Merged
merged 1 commit into from
Nov 18, 2021
Merged

add arm64 support for M1 Mac #213

merged 1 commit into from
Nov 18, 2021

Conversation

DanboDuan
Copy link
Contributor

it will fail if it is built on M1 Mac, so add arm64 for M1 Mac

elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set("${result_var_name}" "aarch64" PARENT_SCOPE)
elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AArch64|aarch64|arm64")
if(CMAKE_SYSTEM_NAME MATCHES Darwin)
Copy link
Member

Choose a reason for hiding this comment

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

I am not a CMake expert; should CMAKE_SYSTEM_NAME be string-substituted here (like ${CMAKE_SYSTEM_PROCESSOR} is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this cmake code is just copied from swift-atomics/cmake/modules/SwiftSupport.cmake.
or I can update it to STREQUAL

Copy link
Member

Choose a reason for hiding this comment

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

Ok. I'll take this as-is, then, and if Saleem or Michael have any opinions on how it could be better we'll do that separately.

Copy link
Contributor

Choose a reason for hiding this comment

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

This matches the other projects, and is fine. It avoids some of the noise by not dereferencing which is common.

@stephentyrone
Copy link
Member

@compnerd and/or @gottesmm, can you review this, please?

@stephentyrone
Copy link
Member

@swift-ci test

@stephentyrone stephentyrone merged commit f3365bd into apple:main Nov 18, 2021
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