@@ -1536,34 +1536,21 @@ function(add_swift_library name)
1536
1536
# library itself.
1537
1537
if (SWIFTLIB_HAS_SWIFT_CONTENT AND NOT SWIFTLIB_IS_STDLIB_CORE )
1538
1538
list (APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core )
1539
- endif ()
1540
-
1541
- if ((NOT "${SWIFT_BUILD_STDLIB} " ) AND
1542
- (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS} " STREQUAL "" ))
1543
- list (REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
1544
- Core )
1545
- endif ()
1546
1539
1547
- if (SWIFTLIB_HAS_SWIFT_CONTENT AND NOT SWIFTLIB_IS_STDLIB_CORE )
1548
- # All Swift code depends on the SwiftOnoneSupport in non-optimized mode,
1549
- # except for the standard library itself.
1550
- is_build_type_optimized ("${SWIFT_STDLIB_BUILD_TYPE} " optimized )
1551
- if (NOT optimized )
1552
- list (APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS SwiftOnoneSupport )
1540
+ # swiftSwiftOnoneSupport does not depend on itself, obviously.
1541
+ if (NOT ${name} STREQUAL swiftSwiftOnoneSupport )
1542
+ # All Swift code depends on the SwiftOnoneSupport in non-optimized mode,
1543
+ # except for the standard library itself.
1544
+ is_build_type_optimized ("${SWIFT_STDLIB_BUILD_TYPE} " optimized )
1545
+ if (NOT optimized )
1546
+ list (APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS SwiftOnoneSupport )
1547
+ endif ()
1553
1548
endif ()
1554
1549
endif ()
1555
1550
1556
1551
if ((NOT "${SWIFT_BUILD_STDLIB} " ) AND
1557
- (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS} " STREQUAL "" ))
1558
- list (REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
1559
- SwiftOnoneSupport )
1560
- endif ()
1561
-
1562
- # swiftSwiftOnoneSupport does not depend on itself,
1563
- # obviously.
1564
- if ("${name} " STREQUAL "swiftSwiftOnoneSupport" )
1565
- list (REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
1566
- SwiftOnoneSupport )
1552
+ (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS} " STREQUAL "" ))
1553
+ list (REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS Core SwiftOnoneSupport )
1567
1554
endif ()
1568
1555
1569
1556
translate_flags (SWIFTLIB "${SWIFTLIB_options} " )
0 commit comments