Skip to content

Commit 43ea70c

Browse files
committed
build: support multiple builds of SwiftPrivateLibcExtras
Support building SwiftPrivateLibcExtras for a number of targets simultaneously. This will enable cross-compiling the standard library for multiple foreign targets.
1 parent 2633a0f commit 43ea70c

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
set(swift_private_darwin_extras_module_depends
2-
SwiftPrivate)
3-
4-
if(SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_VARIANTS}")
5-
list(APPEND swift_private_darwin_extras_module_depends
6-
Darwin)
7-
elseif(SWIFT_HOST_VARIANT STREQUAL "linux" OR SWIFT_HOST_VARIANT STREQUAL "freebsd")
8-
list(APPEND swift_private_darwin_extras_module_depends
9-
Glibc)
10-
endif()
11-
121
add_swift_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
132
# This file should be listed the first. Module name is inferred from the
143
# filename.
154
SwiftPrivateLibcExtras.swift
165
Subprocess.c
176
Subprocess.swift
187

19-
SWIFT_MODULE_DEPENDS ${swift_private_darwin_extras_module_depends}
8+
SWIFT_MODULE_DEPENDS SwiftPrivate
209
SWIFT_COMPILE_FLAGS ${STDLIB_SIL_SERIALIZE_ALL}
10+
SWIFT_MODULE_DEPENDS_OSX Darwin
11+
SWIFT_MODULE_DEPENDS_IOS Darwin
12+
SWIFT_MODULE_DEPENDS_TVOS Darwin
13+
SWIFT_MODULE_DEPENDS_WATCHOS Darwin
14+
SWIFT_MODULE_DEPENDS_LINUX Glibc
15+
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
2116
INSTALL_IN_COMPONENT stdlib-experimental)

0 commit comments

Comments
 (0)