Skip to content

build: replace some is_darwin_sdk usage #19901

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
Oct 16, 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
15 changes: 5 additions & 10 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,7 @@ function(_add_swift_lipo_target)
list(APPEND source_binaries $<TARGET_FILE:${source_target}>)
endforeach()

is_darwin_based_sdk("${LIPO_SDK}" IS_DARWIN)
if(IS_DARWIN)
if(${LIPO_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
if(LIPO_CODESIGN)
set(codesign_command COMMAND "codesign" "-f" "-s" "-" "${LIPO_OUTPUT}")
endif()
Expand Down Expand Up @@ -751,8 +750,7 @@ function(_add_swift_library_single target name)
endif()

if (SWIFT_COMPILER_VERSION)
is_darwin_based_sdk("${SWIFTLIB_SINGLE_SDK}" IS_DARWIN)
if(IS_DARWIN)
if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION}" "-Xlinker" "-compatibility_version" "-Xlinker" "1")
endif()
endif()
Expand Down Expand Up @@ -1014,8 +1012,7 @@ function(_add_swift_library_single target name)
endforeach()
endif()

is_darwin_based_sdk("${SWIFTLIB_SINGLE_SDK}" IS_DARWIN)
if(IS_DARWIN)
if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
set(install_name_dir "@rpath")

if(SWIFTLIB_SINGLE_IS_STDLIB)
Expand Down Expand Up @@ -2084,8 +2081,7 @@ function(_add_swift_executable_single name)
list(APPEND link_flags "-Wl,-no_pie")
endif()

is_darwin_based_sdk("${SWIFTEXE_SINGLE_SDK}" IS_DARWIN)
if(IS_DARWIN)
if(${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
list(APPEND link_flags
"-Xlinker" "-rpath"
"-Xlinker" "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
Expand Down Expand Up @@ -2227,8 +2223,7 @@ function(add_swift_target_executable name)
${SWIFTEXE_TARGET_DONT_STRIP_NON_MAIN_SYMBOLS_FLAG}
${SWIFTEXE_DISABLE_ASLR_FLAG})

is_darwin_based_sdk("${sdk}" IS_DARWIN)
if(IS_DARWIN)
if(${sdk} IN_LIST SWIFT_APPLE_PLATFORMS)
add_custom_command_target(unused_var2
COMMAND "codesign" "-f" "-s" "-" "${SWIFT_RUNTIME_OUTPUT_INTDIR}/${VARIANT_NAME}"
CUSTOM_TARGET_NAME "${VARIANT_NAME}_signed"
Expand Down