Skip to content

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