Skip to content

Commit c809a61

Browse files
authored
Merge pull request #7634 from hughbe/debug-optimization-msvc
2 parents 25722bb + b60945f commit c809a61

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ function(_add_variant_c_compile_flags)
186186
list(APPEND result "-momit-leaf-frame-pointer")
187187
endif()
188188
else()
189-
list(APPEND result "-O0")
189+
if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
190+
list(APPEND result "-O0")
191+
else()
192+
list(APPEND result "/Od")
193+
endif()
190194
endif()
191195

192196
# CMake automatically adds the flags for debug info if we use MSVC/clang-cl.

0 commit comments

Comments
 (0)