File tree Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1111,6 +1111,8 @@ function(add_swift_library name)
1111
1111
if ("${SWIFTLIB_TARGET_SDKS} " STREQUAL "" )
1112
1112
set (SWIFTLIB_TARGET_SDKS ${SWIFT_SDKS} )
1113
1113
endif ()
1114
+ list_replace (SWIFTLIB_TARGET_SDKS ALL_POSIX_PLATFORMS "ALL_APPLE_PLATFORMS;ANDROID;CYGWIN;FREEBSD;LINUX" )
1115
+ list_replace (SWIFTLIB_TARGET_SDKS ALL_APPLE_PLATFORMS "IOS;IOS_SIMULATOR;TVOS;TVOS_SIMULATOR;WATCHOS;WATCHOS_SIMULATOR;OSX" )
1114
1116
1115
1117
# All Swift code depends on the standard library, except for the standard
1116
1118
# library itself.
Original file line number Diff line number Diff line change @@ -48,3 +48,15 @@ function(_list_escape_for_shell input_list result_var_name)
48
48
set ("${result_var_name} " "${result} " PARENT_SCOPE )
49
49
endfunction ()
50
50
51
+ function (list_replace input_list old new )
52
+ set (replaced_list )
53
+ foreach (item ${${input_list}} )
54
+ if (${item} STREQUAL ${old} )
55
+ list (APPEND replaced_list ${new} )
56
+ else ()
57
+ list (APPEND replaced_list ${item} )
58
+ endif ()
59
+ endforeach ()
60
+ set ("${input_list} " "${replaced_list} " PARENT_SCOPE )
61
+ endfunction ()
62
+
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ if(SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_VARIANTS}")
9
9
Foundation )
10
10
endif ()
11
11
12
+ # TODO: support this on non-POSIX platforms. It cannot be currently as it
13
+ # depends on pthreads.
12
14
add_swift_library (swiftStdlibCollectionUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
13
15
# This file should be listed the first. Module name is inferred from the
14
16
# filename.
@@ -28,6 +30,7 @@ add_swift_library(swiftStdlibCollectionUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYP
28
30
29
31
SWIFT_MODULE_DEPENDS StdlibUnittest
30
32
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags}
33
+ TARGET_SDKS ALL_POSIX_PLATFORMS
31
34
FRAMEWORK_DEPENDS ${swift_stdlib_unittest_framework_depends}
32
35
INSTALL_IN_COMPONENT stdlib-experimental )
33
36
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ if(SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_VARIANTS}")
14
14
list (APPEND swift_stdlib_unittest_framework_depends Foundation )
15
15
endif ()
16
16
17
+ # TODO: support this on non-POSIX platforms. It cannot be currently as it
18
+ # depends on pthreads.
17
19
add_swift_library (swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
18
20
# This file should be listed the first. Module name is inferred from the
19
21
# filename.
@@ -40,6 +42,7 @@ add_swift_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STD
40
42
SWIFT_MODULE_DEPENDS_LINUX Glibc
41
43
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
42
44
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags}
45
+ TARGET_SDKS ALL_POSIX_PLATFORMS
43
46
FRAMEWORK_DEPENDS ${swift_stdlib_unittest_framework_depends}
44
47
INSTALL_IN_COMPONENT stdlib-experimental )
45
48
Original file line number Diff line number Diff line change @@ -11,5 +11,6 @@ add_swift_library(swiftSwiftPrivatePthreadExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TY
11
11
SWIFT_MODULE_DEPENDS_LINUX Glibc
12
12
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
13
13
SWIFT_COMPILE_FLAGS ${STDLIB_SIL_SERIALIZE_ALL}
14
+ TARGET_SDKS ALL_POSIX_PLATFORMS
14
15
INSTALL_IN_COMPONENT stdlib-experimental )
15
16
You can’t perform that action at this time.
0 commit comments