Skip to content

Commit 6106868

Browse files
committed
Force -swift-version 3 for Standard Library and overlays.
1 parent 7c664d1 commit 6106868

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ function(_compile_swift_files
268268
endif()
269269
endif()
270270

271+
# Force swift 3 compatibility mode for Standard Library and overlay.
272+
if (SWIFTFILE_IS_STDLIB_CORE OR SWIFTFILE_IS_SDK_OVERLAY)
273+
list(APPEND swift_flags "-swift-version" "3")
274+
endif()
275+
271276
if(SWIFTFILE_IS_SDK_OVERLAY)
272277
list(APPEND swift_flags "-autolink-force-load")
273278
endif()

0 commit comments

Comments
 (0)