@@ -262,7 +262,7 @@ function(_compile_swift_files
262
262
if (SWIFTFILE_IS_STDLIB )
263
263
list (APPEND swift_flags "-swift-version" "5" )
264
264
endif ()
265
-
265
+
266
266
# Force swift 4 compatibility mode for overlays.
267
267
if (SWIFTFILE_IS_SDK_OVERLAY )
268
268
list (APPEND swift_flags "-swift-version" "4" )
@@ -344,16 +344,11 @@ function(_compile_swift_files
344
344
list (APPEND module_outputs "${interface_file} " )
345
345
endif ()
346
346
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
-
353
347
if (SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS )
354
348
swift_install_in_component ("${SWIFTFILE_INSTALL_IN_COMPONENT} "
355
349
DIRECTORY "${specific_module_dir} "
356
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} " )
350
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
351
+ OPTIONAL )
357
352
else ()
358
353
swift_install_in_component ("${SWIFTFILE_INSTALL_IN_COMPONENT} "
359
354
FILES ${module_outputs}
@@ -439,7 +434,7 @@ function(_compile_swift_files
439
434
set (file_path "${CMAKE_CURRENT_BINARY_DIR} /${file_name} .txt" )
440
435
string (REPLACE ";" "'\n '" source_files_quoted "${source_files} " )
441
436
file (WRITE "${file_path} " "'${source_files_quoted} '" )
442
-
437
+
443
438
# If this platform/architecture combo supports backward deployment to old
444
439
# Objective-C runtimes, we need to copy a YAML file with legacy type layout
445
440
# information to the build directory so that the compiler can find it.
0 commit comments