Skip to content

Commit f648d97

Browse files
authored
Merge pull request swiftlang#22804 from compnerd/make-the-warnings-rein
stdlib: make cl based compilation reasonable
2 parents 4986105 + 0cfb54d commit f648d97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-Xfrontend" "-verify-syntax-tree"
1818

1919
# Build the runtime with -Wall to catch, e.g., uninitialized variables
2020
# warnings.
21-
list(APPEND SWIFT_RUNTIME_CXX_FLAGS "-Wall")
21+
if(SWIFT_COMPILER_IS_MSVC_LIKE)
22+
list(APPEND SWIFT_RUNTIME_CXX_FLAGS "/W3")
23+
else()
24+
list(APPEND SWIFT_RUNTIME_CXX_FLAGS "-Wall")
25+
endif()
2226

2327
set(SWIFT_RUNTIME_CORE_CXX_FLAGS "${SWIFT_RUNTIME_CXX_FLAGS}")
2428
set(SWIFT_RUNTIME_CORE_LINK_FLAGS "${SWIFT_RUNTIME_LINK_FLAGS}")

0 commit comments

Comments
 (0)