Skip to content

Change the arch argument for configure_sdk_unix to architectures #15756

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
Apr 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,27 +138,28 @@ macro(configure_sdk_darwin
endmacro()

macro(configure_sdk_unix
prefix name lib_subdir triple_name arch triple sdkpath)
prefix name lib_subdir triple_name architectures triple sdkpath)
# Note: this has to be implemented as a macro because it sets global
# variables.

# Todo: this only supports building an SDK for one target arch only.
set(SWIFT_SDK_${prefix}_NAME "${name}")
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${sdkpath}")
set(SWIFT_SDK_${prefix}_VERSION "don't use")
set(SWIFT_SDK_${prefix}_BUILD_NUMBER "don't use")
set(SWIFT_SDK_${prefix}_DEPLOYMENT_VERSION "")
set(SWIFT_SDK_${prefix}_LIB_SUBDIR "${lib_subdir}")
set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "")
set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
set(SWIFT_SDK_${prefix}_ARCHITECTURES "${arch}")
set(SWIFT_SDK_${prefix}_ARCHITECTURES "${architectures}")
if("${prefix}" STREQUAL "CYGWIN")
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "COFF")
else()
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "ELF")
endif()

set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE "${triple}")
foreach(arch ${architectures})
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${sdkpath}")
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE "${triple}")
endforeach()

# Add this to the list of known SDKs.
list(APPEND SWIFT_CONFIGURED_SDKS "${prefix}")
Expand Down