-
Notifications
You must be signed in to change notification settings - Fork 471
Improve host architecture detection #322
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
Conversation
CMakeLists.txt
Outdated
set(SWIFT_HOST_ARCH "i686") | ||
else() | ||
message(FATAL_ERROR "Unrecognized architecture on host system: ${CMAKE_SYSTEM_PROCESSOR}") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should extract this into a separate function and put it into a support module incase we need this elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, added an additional function to the SwiftSupport.cmake
module, since it's related to the architecture naming used by Swift.
9e54f5c
to
ae5425c
Compare
cmake/modules/SwiftSupport.cmake
Outdated
# Usage: | ||
# get_swift_host_arch(result_var_name) | ||
# | ||
# If the current architecture is supportedi by Swift, sets ${result_var_name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: supportedi -> supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
please squash the pull request |
@swift-ci please test |
a22e3bb
to
6c14ffc
Compare
Squashed. |
Gah of course the results of the tests are hidden now. stupid UI |
@swift-ci please test |
Improve host architecture detection Signed-off-by: Daniel A. Steffen <[email protected]>
This PR improves host detection to provide the same logic being used in Swift.
Instead of using the specific
${CMAKE_SYSTEM_PROCESSOR}
directly, this value should be used to choose a more generic variant.No changes needed for ${SWIFT_OS}.
This PR also fixes an issue on ARM, where at the moment
SWIFT_RUNTIME_LIBDIR
points to.../armv7l/
instead of.../armv7/
./cc @compnerd