Skip to content

Commit 9074b94

Browse files
committed
Enable the Swift diagnostic formatter for standard library builds
1 parent 53989ad commit 9074b94

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
3636
list(APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-xc++")
3737
endif()
3838

39+
# Use the new diagnostic formatter.
40+
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-diagnostic-style" "swift")
41+
3942
# We should avoid non-literals in format strings, or appropriately mark
4043
# functions.
4144
check_cxx_compiler_flag("-Wformat-nonliteral -Werror=format-nonliteral" CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING)

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
148148
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
149149
-parse-stdlib
150150
-Xfrontend -enable-experimental-concurrency
151+
-diagnostic-style swift
151152
${SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS}
152153
${swift_concurrency_options}
153154
INSTALL_IN_COMPONENT ${swift_concurrency_install_component}

0 commit comments

Comments
 (0)