Skip to content

Commit d829fe0

Browse files
kateinoigakukunrunner
authored andcommitted
[wasm][cmake] Add WASI specific stdlib dependencies
Currently WASI target doesn't support SwiftPrivateThreadExtras, so we need to remove it from the common dependencies. Also WASI target has its own libc module WASILibc, so we need to add it as well as other libc modules.
1 parent 8df5969 commit d829fe0

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

stdlib/private/StdlibUnittest/CMakeLists.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,20 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
4949
TestHelpers.swift
5050
TypeIndexed.swift
5151

52-
SWIFT_MODULE_DEPENDS SwiftPrivate SwiftPrivateThreadExtras SwiftPrivateLibcExtras ${swift_stdlib_unittest_modules}
53-
SWIFT_MODULE_DEPENDS_IOS Darwin
54-
SWIFT_MODULE_DEPENDS_OSX Darwin
55-
SWIFT_MODULE_DEPENDS_TVOS Darwin
56-
SWIFT_MODULE_DEPENDS_WATCHOS Darwin
57-
SWIFT_MODULE_DEPENDS_MACCATALYST Darwin
58-
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
59-
SWIFT_MODULE_DEPENDS_LINUX Glibc
60-
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
61-
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
62-
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
63-
SWIFT_MODULE_DEPENDS_HAIKU Glibc
64-
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
52+
SWIFT_MODULE_DEPENDS SwiftPrivate SwiftPrivateLibcExtras ${swift_stdlib_unittest_modules}
53+
SWIFT_MODULE_DEPENDS_IOS Darwin SwiftPrivateThreadExtras
54+
SWIFT_MODULE_DEPENDS_OSX Darwin SwiftPrivateThreadExtras
55+
SWIFT_MODULE_DEPENDS_TVOS Darwin SwiftPrivateThreadExtras
56+
SWIFT_MODULE_DEPENDS_WATCHOS Darwin SwiftPrivateThreadExtras
57+
SWIFT_MODULE_DEPENDS_MACCATALYST Darwin SwiftPrivateThreadExtras
58+
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}" SwiftPrivateThreadExtras
59+
SWIFT_MODULE_DEPENDS_LINUX Glibc SwiftPrivateThreadExtras
60+
SWIFT_MODULE_DEPENDS_FREEBSD Glibc SwiftPrivateThreadExtras
61+
SWIFT_MODULE_DEPENDS_OPENBSD Glibc SwiftPrivateThreadExtras
62+
SWIFT_MODULE_DEPENDS_CYGWIN Glibc SwiftPrivateThreadExtras
63+
SWIFT_MODULE_DEPENDS_HAIKU Glibc SwiftPrivateThreadExtras
64+
SWIFT_MODULE_DEPENDS_WASI WASILibc
65+
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK SwiftPrivateThreadExtras
6566
C_COMPILE_FLAGS -I${SWIFT_SOURCE_DIR}/stdlib/include
6667
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
6768
INSTALL_IN_COMPONENT stdlib-experimental

stdlib/private/SwiftPrivate/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
2626
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
2727
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
2828
SWIFT_MODULE_DEPENDS_HAIKU Glibc
29+
SWIFT_MODULE_DEPENDS_WASI WASILibc
2930
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
3031
SWIFT_COMPILE_FLAGS ${swift_swiftprivate_compile_flags} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
3132
INSTALL_IN_COMPONENT stdlib-experimental

stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUIL
3636
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
3737
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
3838
SWIFT_MODULE_DEPENDS_HAIKU Glibc
39+
SWIFT_MODULE_DEPENDS_WASI WASILibc
3940
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
4041
INCORPORATE_OBJECT_LIBRARIES ${swift_private_libc_extras_incorporate_object_libraries}
4142
INSTALL_IN_COMPONENT stdlib-experimental

stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU
1717
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
1818
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
1919
SWIFT_MODULE_DEPENDS_HAIKU Glibc
20+
SWIFT_MODULE_DEPENDS_WASI WASILibc
2021
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
2122
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
2223
INSTALL_IN_COMPONENT stdlib-experimental

stdlib/public/Differentiation/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ add_swift_target_library(swift_Differentiation ${SWIFT_STDLIB_LIBRARY_BUILD_TYPE
4040
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
4141
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
4242
SWIFT_MODULE_DEPENDS_HAIKU Glibc
43+
SWIFT_MODULE_DEPENDS_WASI WASILibc
4344
SWIFT_MODULE_DEPENDS_WINDOWS CRT
4445

4546
C_COMPILE_FLAGS

0 commit comments

Comments
 (0)