@@ -262,7 +262,7 @@ function(_compile_swift_files
262262 if (SWIFTFILE_IS_STDLIB)
263263 list (APPEND swift_flags "-swift-version" "5" )
264264 endif ()
265-
265+
266266 # Force swift 4 compatibility mode for overlays.
267267 if (SWIFTFILE_IS_SDK_OVERLAY)
268268 list (APPEND swift_flags "-swift-version" "4" )
@@ -344,16 +344,11 @@ function(_compile_swift_files
344344 list (APPEND module_outputs "${interface_file} " )
345345 endif ()
346346
347- set (optional_arg)
348- if (sdk IN_LIST SWIFT_APPLE_PLATFORMS)
349- # Allow installation of stdlib without building all variants on Darwin.
350- set (optional_arg "OPTIONAL" )
351- endif ()
352-
353347 if (SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
354348 swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT} "
355349 DIRECTORY "${specific_module_dir} "
356- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} " )
350+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
351+ OPTIONAL )
357352 else ()
358353 swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT} "
359354 FILES ${module_outputs}
@@ -439,7 +434,7 @@ function(_compile_swift_files
439434 set (file_path "${CMAKE_CURRENT_BINARY_DIR} /${file_name} .txt" )
440435 string (REPLACE ";" "'\n '" source_files_quoted "${source_files} " )
441436 file (WRITE "${file_path} " "'${source_files_quoted} '" )
442-
437+
443438 # If this platform/architecture combo supports backward deployment to old
444439 # Objective-C runtimes, we need to copy a YAML file with legacy type layout
445440 # information to the build directory so that the compiler can find it.
0 commit comments