You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge private dependencies into single static library
`Foundation` imports `CoreFoundation` with `@_implementationOnly` as a
private dependency, and it doesn't emit `IMPORTED_MODULE` in
swiftmodule.
Users of Foundation can link `libCoreFoundation.so` automatically when
using dynamic linking because it's already linked into
`libFoundation.so`.
However, this automatic linking doesn't work when static linking, so
users need to link CoreFoundation and dependent libraries of
CoreFoundation explicitly by adding `-lCoreFoundation -lBlocksRuntime
-licui18n`.
To avoid forcing users to link private dependencies explicitly, this
patch changed to merge the dependencies into libFoundation.a. And also
to avoid forcing to link dependent libs of CoreFoundation like `curl` or
`icui18n`, add `LINK_LIBRARY` entry in Foundation.swiftmodule using
`-public-autolink-library` which is introduced by
swiftlang/swift#35936
0 commit comments