Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions SwiftCompilerSources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. "
Expand Down