Skip to content

Commit e08308b

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 af69672 commit e08308b

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
@@ -453,6 +453,10 @@ function(_compile_swift_files
453453
MACCATALYST_BUILD_FLAVOR "${maccatalyst_build_flavor}"
454454
)
455455

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

0 commit comments

Comments
 (0)