We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 88d4680 + 066b6d1 commit 6a7a4c8Copy full SHA for 6a7a4c8
SwiftCompilerSources/CMakeLists.txt
@@ -98,10 +98,17 @@ function(add_swift_compiler_modules_library name)
98
"DEPENDS"
99
${ARGN})
100
101
+ # Prior to 5.9, we have to use the experimental flag for C++ interop.
102
+ if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9)
103
+ set(cxx_interop_flag "-enable-experimental-cxx-interop")
104
+ else()
105
+ set(cxx_interop_flag "-cxx-interoperability-mode=default")
106
+ endif()
107
+
108
set(swift_compile_options
109
"-color-diagnostics"
110
"-Xfrontend" "-validate-tbd-against-ir=none"
- "-Xfrontend" "-enable-experimental-cxx-interop"
111
+ "${cxx_interop_flag}"
112
"-Xfrontend" "-disable-target-os-checking"
113
"-Xcc" "-std=c++17"
114
"-Xcc" "-DCOMPILED_WITH_SWIFT" "-Xcc" "-DSWIFT_TARGET"
0 commit comments