File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -1968,6 +1968,12 @@ function(add_swift_target_library name)
1968
1968
WORLD_READ )
1969
1969
endif ()
1970
1970
1971
+ set (optional_arg )
1972
+ if (sdk IN_LIST SWIFT_APPLE_PLATFORMS )
1973
+ # Allow installation of stdlib without building all variants on Darwin.
1974
+ set (optional_arg "OPTIONAL" )
1975
+ endif ()
1976
+
1971
1977
if (sdk STREQUAL WINDOWS AND CMAKE_SYSTEM_NAME STREQUAL Windows )
1972
1978
swift_install_in_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} "
1973
1979
TARGETS ${name} -windows-${SWIFT_PRIMARY_VARIANT_ARCH}
@@ -1979,7 +1985,8 @@ function(add_swift_target_library name)
1979
1985
swift_install_in_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} "
1980
1986
FILES "${UNIVERSAL_LIBRARY_NAME} "
1981
1987
DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /${resource_dir} /${resource_dir_sdk_subdir} "
1982
- PERMISSIONS ${file_permissions} )
1988
+ PERMISSIONS ${file_permissions}
1989
+ "${optional_arg} " )
1983
1990
endif ()
1984
1991
if (sdk STREQUAL WINDOWS )
1985
1992
foreach (arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES} )
@@ -2026,7 +2033,8 @@ function(add_swift_target_library name)
2026
2033
PERMISSIONS
2027
2034
OWNER_READ OWNER_WRITE
2028
2035
GROUP_READ
2029
- WORLD_READ )
2036
+ WORLD_READ
2037
+ "${optional_arg} " )
2030
2038
endif ()
2031
2039
2032
2040
# Add Swift standard library targets as dependencies to the top-level
Original file line number Diff line number Diff line change @@ -347,9 +347,16 @@ function(_compile_swift_files
347
347
list (APPEND module_outputs "${interface_file} " )
348
348
endif ()
349
349
350
+ set (optional_arg )
351
+ if (sdk IN_LIST SWIFT_APPLE_PLATFORMS )
352
+ # Allow installation of stdlib without building all variants on Darwin.
353
+ set (optional_arg "OPTIONAL" )
354
+ endif ()
355
+
350
356
swift_install_in_component ("${SWIFTFILE_INSTALL_IN_COMPONENT} "
351
357
FILES ${module_outputs}
352
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} " )
358
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
359
+ "${optional_arg} " )
353
360
354
361
set (line_directive_tool "${SWIFT_SOURCE_DIR} /utils/line-directive" )
355
362
set (swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /swiftc" )
You can’t perform that action at this time.
0 commit comments