Skip to content

Add architecture specific path variables to SwiftConfigureSDK #15378

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
Mar 21, 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
9 changes: 9 additions & 0 deletions cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ function(_report_sdk prefix)
endforeach()
else()
message(STATUS " Path: ${SWIFT_SDK_${prefix}_PATH}")
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
message(STATUS " ${arch} Path: ${SWIFT_SDK_${prefix}_ARCH_${arch}_PATH}")
endforeach()
endif()
message(STATUS " Version: ${SWIFT_SDK_${prefix}_VERSION}")
message(STATUS " Build number: ${SWIFT_SDK_${prefix}_BUILD_NUMBER}")
Expand Down Expand Up @@ -122,6 +125,9 @@ macro(configure_sdk_darwin
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "MACHO")

foreach(arch ${architectures})
# On Darwin, all archs share the same SDK path.
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${SWIFT_SDK_${prefix}_PATH}")

set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
"${arch}-apple-${SWIFT_SDK_${prefix}_TRIPLE_NAME}")
endforeach()
Expand All @@ -137,8 +143,10 @@ macro(configure_sdk_unix
# 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}_PATH "${sdkpath}")
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 "")
Expand Down Expand Up @@ -186,6 +194,7 @@ macro(configure_sdk_windows prefix sdk_name environment architectures)
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
"${arch}-unknown-windows-${environment}")
endif()
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/")
endforeach()

# Add this to the list of known SDKs.
Expand Down