File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Sources/Overlays/_Testing_Foundation Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,18 @@ add_library(_Testing_Foundation
1717 ReexportTesting.swift)
1818
1919target_link_libraries (_Testing_Foundation PUBLIC
20- Testing
21- Foundation)
20+ Testing)
21+
22+ # Although this library links Foundation on all platforms, it only does so using
23+ # `target_link_libraries()` when building for non-Apple platforms. This is
24+ # because that command uses the `-lFoundation` linker flag, but on Apple
25+ # platforms Foundation is a .framework and requires a different flag. However,
26+ # we don't need to explicitly pass any linker flag since it's handled
27+ # automatically on Apple platforms via auto-linking.
28+ if (NOT APPLE )
29+ target_link_libraries (Testing PUBLIC
30+ Foundation)
31+ endif ()
2232
2333# Note: This does not enable Library Evolution, despite emitting a module
2434# interface, because Foundation does not have Library Evolution enabled for all
You can’t perform that action at this time.
0 commit comments