Skip to content

Commit f1c2a57

Browse files
committed
build: link swiftCore against Shell32
We are now using Shell APIs for the command line parsing. Ensure that we link against the Shell32 library. This is needed for the cross-compilation as on Windows, the environment will set a default link against a number of libraries. This is more precise and explicit.
1 parent b697b2c commit f1c2a57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/core/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ if(SWIFT_BUILD_STATIC_STDLIB AND "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")
284284
list(APPEND swift_core_private_link_libraries swiftImageInspectionShared)
285285
endif()
286286

287+
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL Windows)
288+
list(APPEND swift_core_private_link_libraries shell32)
289+
endif()
290+
287291
add_swift_target_library(swiftCore
288292
${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STDLIB_CORE
289293
${SWIFTLIB_SOURCES}

0 commit comments

Comments
 (0)