Skip to content

Commit 3f828e9

Browse files
committed
build: ensure that we push -static into the flags
The CxxStdlib module is built statically only. We would previously build the static library but indicate dynamic linking. This would incorrectly code generate in the client on Windows making it impossible to use the module.
1 parent 7020cf3 commit 3f828e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ function(_compile_swift_files
455455
MACCATALYST_BUILD_FLAVOR "${maccatalyst_build_flavor}"
456456
)
457457

458+
if(SWIFTFILE_STATIC)
459+
list(APPEND swift_flags -static)
460+
endif()
461+
458462
# Determine the subdirectory where the binary should be placed.
459463
set(library_subdir_sdk "${SWIFTFILE_SDK}")
460464
if(maccatalyst_build_flavor STREQUAL "ios-like")

0 commit comments

Comments
 (0)