Skip to content

Commit 7c65568

Browse files
authored
Merge pull request #22482 from compnerd/mix-and-match-no-more
build: fix mismatch of MSVCRT in release mode
2 parents 80ce2c3 + f441f08 commit 7c65568

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,10 @@ function(_add_swift_library_single target name)
821821
endif()
822822
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xfrontend;-autolink-library;-Xfrontend;oldnames)
823823
# TODO(compnerd) handle /MT and /MTd
824-
if("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
825-
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xfrontend;-autolink-library;-Xfrontend;msvcrt)
826-
else()
824+
if(CMAKE_BUILD_TYPE MATCHES Debug)
827825
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xfrontend;-autolink-library;-Xfrontend;msvcrtd)
826+
else()
827+
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xfrontend;-autolink-library;-Xfrontend;msvcrt)
828828
endif()
829829
endif()
830830

0 commit comments

Comments
 (0)