Skip to content

Commit dd6a6d3

Browse files
committed
build: correct build type check
This corrects the casing which would previously not match. Unfortunately, the `MATCHES` operator also does not handle the case insensitivity properly. This enables building just the standard library on Linux for Windows.
1 parent 8788253 commit dd6a6d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ function(_add_variant_c_compile_flags)
227227
# -D_MD or D_MDd either, as CMake does this automatically.
228228
if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
229229
list(APPEND result -Xclang;--dependent-lib=oldnames)
230-
# TODO(compnerd) handle /MT, /MTd, /MD, /MDd
231-
if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
230+
# TODO(compnerd) handle /MT, /MTd
231+
if("${CFLAGS_BUILD_TYPE}" STREQUAL "Debug")
232232
list(APPEND result "-D_MDd")
233233
list(APPEND result -Xclang;--dependent-lib=msvcrtd)
234234
else()

0 commit comments

Comments
 (0)