diff --git a/SwiftCompilerSources/CMakeLists.txt b/SwiftCompilerSources/CMakeLists.txt index 9732e112362f5..30e2d8c5ae583 100644 --- a/SwiftCompilerSources/CMakeLists.txt +++ b/SwiftCompilerSources/CMakeLists.txt @@ -101,19 +101,12 @@ function(add_swift_compiler_modules_library name) set(swift_compile_options "-color-diagnostics" "-Xfrontend" "-validate-tbd-against-ir=none" - "${cxx_interop_flag}" + "-cxx-interoperability-mode=default" "-Xfrontend" "-disable-target-os-checking" "-Xcc" "-std=c++17" "-Xcc" "-DCOMPILED_WITH_SWIFT" "-Xcc" "-DSWIFT_TARGET" "-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable") - # Prior to 5.9, we have to use the experimental flag for C++ interop. - if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9) - list(APPEND swift_compile_options "-Xfrontend" "-enable-experimental-cxx-interop") - else() - list(APPEND swift_compile_options "-cxx-interoperability-mode=default") - endif() - if (NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS") if(SWIFT_MIN_RUNTIME_VERSION) list(APPEND swift_compile_options @@ -327,7 +320,7 @@ else() 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).") endif() - set(min_supported_swift_version 5.8) + set(min_supported_swift_version 5.9) if(CMAKE_Swift_COMPILER_VERSION VERSION_LESS "${min_supported_swift_version}") message(FATAL_ERROR "Outdated Swift compiler: building with host tools requires Swift ${min_supported_swift_version} or newer. "