Skip to content

Commit c6ce6ee

Browse files
committed
[SwiftCompilerSources][build] Bump the minimum supported compiler version to 5.9
Building SwiftCompilerSources with a Swift 5.8 compiler is not tested anymore, and it might showcase bugs in the old compiler version that are already fixed. This bumps the minimum allowed version to Swift 5.9, which was shipped in Xcode 15.
1 parent 4d01253 commit c6ce6ee

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

SwiftCompilerSources/CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,12 @@ function(add_swift_compiler_modules_library name)
101101
set(swift_compile_options
102102
"-color-diagnostics"
103103
"-Xfrontend" "-validate-tbd-against-ir=none"
104-
"${cxx_interop_flag}"
104+
"-cxx-interoperability-mode=default"
105105
"-Xfrontend" "-disable-target-os-checking"
106106
"-Xcc" "-std=c++17"
107107
"-Xcc" "-DCOMPILED_WITH_SWIFT" "-Xcc" "-DSWIFT_TARGET"
108108
"-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable")
109109

110-
# Prior to 5.9, we have to use the experimental flag for C++ interop.
111-
if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9)
112-
list(APPEND swift_compile_options "-Xfrontend" "-enable-experimental-cxx-interop")
113-
else()
114-
list(APPEND swift_compile_options "-cxx-interoperability-mode=default")
115-
endif()
116-
117110
if (NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
118111
if(SWIFT_MIN_RUNTIME_VERSION)
119112
list(APPEND swift_compile_options
@@ -327,7 +320,7 @@ else()
327320
message(FATAL_ERROR "The Swift compiler (${CMAKE_Swift_COMPILER}) differs from the Swift compiler in SWIFT_NATIVE_SWIFT_TOOLS_PATH (${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc).")
328321
endif()
329322

330-
set(min_supported_swift_version 5.8)
323+
set(min_supported_swift_version 5.9)
331324
if(CMAKE_Swift_COMPILER_VERSION VERSION_LESS "${min_supported_swift_version}")
332325
message(FATAL_ERROR
333326
"Outdated Swift compiler: building with host tools requires Swift ${min_supported_swift_version} or newer. "

0 commit comments

Comments
 (0)