Skip to content

Commit 49bf2c6

Browse files
committed
Fix C++ interop in SwiftCompilerSources
1 parent f803cdd commit 49bf2c6

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
@@ -120,6 +120,11 @@ function(add_swift_compiler_modules_library name)
120120
"-Xfrontend" "${SWIFT_MIN_RUNTIME_VERSION}")
121121
endif()
122122
list(APPEND swift_compile_options "-Xfrontend" "-disable-implicit-string-processing-module-import")
123+
124+
# We cannot use Unsafe*Pointer when importing C++ move-only types until the
125+
# host libraries are updated to Swift 6.0, because that importing strategy
126+
# requires _Pointer have its Pointee: ~Copyable. (rdar://128013193)
127+
list(APPEND swift_compile_options "-Xfrontend" "-cxx-interop-use-opaque-pointer-for-moveonly")
123128
endif()
124129

125130
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

0 commit comments

Comments
 (0)