Skip to content

Commit

Permalink
build: remove unnecessary parameter to configure_sdk_unix
Browse files Browse the repository at this point in the history
Remove the duplicated platform name parameter to the unix SDK
configuration..  This value is implicit currently and can be computed.
This needs to be computed to permit parallel co-installations of
architectures for targets which do not support fat binaries (i.e.
non-MachO targets).
  • Loading branch information
compnerd committed Oct 8, 2018
1 parent f0885be commit f02cd8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")
# Should we build the standard library for the host?
is_sdk_requested(LINUX swift_build_linux)
if(swift_build_linux)
configure_sdk_unix(LINUX "Linux" "linux" "${SWIFT_HOST_VARIANT}" "${SWIFT_HOST_VARIANT_ARCH}" "${SWIFT_HOST_TRIPLE}")
configure_sdk_unix(LINUX "Linux" "linux" "${SWIFT_HOST_VARIANT_ARCH}" "${SWIFT_HOST_TRIPLE}")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
endif()
Expand All @@ -680,7 +680,7 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "FREEBSD")
# cross-compilation.
string(REPLACE "[-].*" "" FREEBSD_SYSTEM_VERSION ${CMAKE_SYSTEM_VERSION})
message(STATUS "FreeBSD Version: ${FREEBSD_SYSTEM_VERSION}")
configure_sdk_unix(FREEBSD "FreeBSD" "freebsd" "freebsd" "x86_64" "x86_64-unknown-freebsd${FREEBSD_SYSTEM_VERSION}")
configure_sdk_unix(FREEBSD "FreeBSD" "freebsd" "x86_64" "x86_64-unknown-freebsd${FREEBSD_SYSTEM_VERSION}")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "x86_64")

Expand All @@ -690,7 +690,7 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "CYGWIN")
set(SWIFT_HOST_VARIANT "cygwin" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [cygwin].")

configure_sdk_unix(CYGWIN "Cygwin" "cygwin" "cygwin" "x86_64" "x86_64-unknown-windows-cygnus")
configure_sdk_unix(CYGWIN "Cygwin" "cygwin" "x86_64" "x86_64-unknown-windows-cygnus")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "x86_64")

Expand All @@ -709,7 +709,7 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "HAIKU")
set(SWIFT_HOST_VARIANT "haiku" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [haiku].")

configure_sdk_unix(HAIKU "Haiku" "haiku" "haiku" "x86_64" "x86_64-unknown-haiku")
configure_sdk_unix(HAIKU "Haiku" "haiku" "x86_64" "x86_64-unknown-haiku")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "x86_64")

Expand Down Expand Up @@ -771,7 +771,7 @@ if(swift_build_android AND NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
if("${SWIFT_SDK_ANDROID_ARCHITECTURES}" STREQUAL "")
set(SWIFT_SDK_ANDROID_ARCHITECTURES armv7;aarch64)
endif()
configure_sdk_unix(ANDROID "Android" "android" "android" "${SWIFT_SDK_ANDROID_ARCHITECTURES}" "")
configure_sdk_unix(ANDROID "Android" "android" "${SWIFT_SDK_ANDROID_ARCHITECTURES}" "")
endif()

# Should we cross-compile the standard library for Windows?
Expand Down
6 changes: 3 additions & 3 deletions cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ macro(configure_sdk_darwin
_report_sdk("${prefix}")
endmacro()

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

set(SWIFT_SDK_${prefix}_NAME "${name}")
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}_LIB_SUBDIR "${platform}")
set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "")
set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${platform}")
set(SWIFT_SDK_${prefix}_ARCHITECTURES "${architectures}")
if("${prefix}" STREQUAL "CYGWIN")
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "COFF")
Expand Down

0 comments on commit f02cd8f

Please sign in to comment.