File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1273,7 +1273,7 @@ function(_add_swift_library_single target name)
1273
1273
# doing so will result in incorrect symbol resolution and linkage. We created
1274
1274
# import library targets when the library was added. Use that to adjust the
1275
1275
# link libraries.
1276
- if (" ${ SWIFTLIB_SINGLE_SDK} " STREQUAL " WINDOWS" )
1276
+ if (SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL Windows )
1277
1277
foreach (library_list LINK_LIBRARIES INTERFACE_LINK_LIBRARIES PRIVATE_LINK_LIBRARIES )
1278
1278
set (import_libraries )
1279
1279
foreach (library ${SWIFTLIB_SINGLE_${library_list}} )
@@ -1283,7 +1283,7 @@ function(_add_swift_library_single target name)
1283
1283
# libraries are only associated with shared libraries, so add an
1284
1284
# additional check for that as well.
1285
1285
set (import_library ${library} )
1286
- if (TARGET ${library} AND NOT " ${CMAKE_SYSTEM_NAME} " STREQUAL "Windows" )
1286
+ if (TARGET ${library} )
1287
1287
get_target_property (type ${library} TYPE )
1288
1288
if (${type} STREQUAL "SHARED_LIBRARY" )
1289
1289
set (import_library ${library} _IMPLIB )
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ if(SWIFT_BUILD_SDK_OVERLAY)
6
6
# SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
7
7
# SDK overlay. It can't be built separately from the SDK overlay.
8
8
add_subdirectory (RuntimeUnittest )
9
- add_subdirectory (StdlibUnittest )
10
9
add_subdirectory (StdlibUnicodeUnittest )
11
10
add_subdirectory (StdlibCollectionUnittest )
12
11
add_subdirectory (SwiftPrivateLibcExtras )
13
12
add_subdirectory (SwiftPrivateThreadExtras )
14
13
14
+ # NOTE(compnerd) this must come after SwiftPrivateLibcExtras and
15
+ # SwiftPrivateThreadExtras to ensure that the dependency targets are setup in
16
+ # the correct order for Windows.
17
+ add_subdirectory (StdlibUnittest )
18
+
15
19
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
16
20
add_subdirectory (StdlibUnittestFoundationExtras )
17
21
if (SWIFT_INCLUDE_TESTS )
You can’t perform that action at this time.
0 commit comments