Skip to content

Commit d0d1a33

Browse files
author
Davide Italiano
committed
[Runtime] Enable -Wall for the builds.
This helps catching trivial mistakes & UB, e.g. uninitialized booleans, see, e.g. swiftlang#14400
1 parent 5b4e3f2 commit d0d1a33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if(SWIFT_RUNTIME_USE_SANITIZERS)
1313
endif()
1414
endif()
1515

16+
# Build the runtime with -Wall to catch, e.g., uninitialized variables
17+
# warnings.
18+
list(APPEND SWIFT_RUNTIME_CXX_FLAGS "-Wall")
19+
1620
set(SWIFT_RUNTIME_CORE_CXX_FLAGS "${SWIFT_RUNTIME_CXX_FLAGS}")
1721
set(SWIFT_RUNTIME_CORE_LINK_FLAGS "${SWIFT_RUNTIME_LINK_FLAGS}")
1822

0 commit comments

Comments
 (0)