@@ -220,7 +220,7 @@ set(swift_core_link_flags "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")
220
220
set (swift_core_framework_depends )
221
221
set (swift_core_private_link_libraries )
222
222
set (swift_stdlib_compile_flags "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS} " )
223
- if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
223
+ if (SWIFT_PRIMARY_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS )
224
224
list (APPEND swift_core_link_flags "-all_load" )
225
225
list (APPEND swift_core_framework_depends Foundation )
226
226
list (APPEND swift_core_framework_depends CoreFoundation )
@@ -238,24 +238,21 @@ else()
238
238
#set(LINK_FLAGS
239
239
# -Wl,--whole-archive swiftRuntime -Wl,--no-whole-archive)
240
240
if ("${SWIFT_PATH_TO_LIBICU_BUILD} " STREQUAL "" )
241
- list (APPEND swift_core_private_link_libraries
242
- ICU_UC ICU_I18N )
241
+ list (APPEND swift_core_private_link_libraries ICU_UC ICU_I18N )
243
242
else ()
244
243
list (APPEND swift_core_private_link_libraries -licui18nswift -licuucswift -licudataswift )
245
244
endif ()
246
245
endif ()
247
246
248
247
if ("${CMAKE_SYSTEM_NAME} " STREQUAL "CYGWIN" )
249
- execute_process (COMMAND "cygpath" "-u" "$ENV{SYSTEMROOT} "
250
- OUTPUT_VARIABLE ENV_SYSTEMROOT )
251
-
252
- list (APPEND swift_core_link_flags "${ENV_SYSTEMROOT} /system32/psapi.dll" )
248
+ # TODO(compnerd) cache this variable to permit re-configuration
249
+ execute_process (COMMAND "cygpath" "-u" "$ENV{SYSTEMROOT} " OUTPUT_VARIABLE ENV_SYSTEMROOT )
250
+ list (APPEND swift_core_private_link_libraries "${ENV_SYSTEMROOT} /system32/psapi.dll" )
253
251
endif ()
254
252
255
- if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
253
+ if (SWIFT_PRIMARY_VARIANT_SDK STREQUAL FREEBSD )
256
254
find_library (EXECINFO_LIBRARY execinfo )
257
- list (APPEND swift_core_private_link_libraries
258
- ${EXECINFO_LIBRARY} )
255
+ list (APPEND swift_core_private_link_libraries ${EXECINFO_LIBRARY} )
259
256
endif ()
260
257
261
258
option (SWIFT_CHECK_ESSENTIAL_STDLIB
@@ -280,7 +277,7 @@ endif()
280
277
281
278
282
279
set (shared_only_libs )
283
- if (SWIFT_BUILD_STATIC_STDLIB AND "${SWIFT_HOST_VARIANT_SDK } " STREQUAL "LINUX" )
280
+ if (SWIFT_BUILD_STATIC_STDLIB AND "${SWIFT_PRIMARY_VARIANT_SDK } " STREQUAL "LINUX" )
284
281
list (APPEND swift_core_private_link_libraries swiftImageInspectionShared )
285
282
endif ()
286
283
0 commit comments