Skip to content

Commit 819780e

Browse files
committed
Fix C++ interop in SwiftCompilerSources
part of rdar://128013193
1 parent face056 commit 819780e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ function(add_swift_compiler_modules_library name)
121121
"-Xfrontend" "${SWIFT_MIN_RUNTIME_VERSION}")
122122
endif()
123123
list(APPEND swift_compile_options "-Xfrontend" "-disable-implicit-string-processing-module-import")
124+
125+
# We cannot use Unsafe*Pointer when importing C++ move-only types until the
126+
# host libraries are updated to Swift 6.0, because that importing strategy
127+
# requires _Pointer have its Pointee: ~Copyable. (rdar://128013193)
128+
list(APPEND swift_compile_options "-Xfrontend" "-cxx-interop-use-opaque-pointer-for-moveonly")
124129
endif()
125130

126131
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

0 commit comments

Comments
 (0)