Description
Previous ID | SR-1738 |
Radar | None |
Original Reporter | @modocache |
Type | Improvement |
Status | Closed |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Project Infrastructure |
Labels | Improvement |
Assignee | @modocache |
Priority | Medium |
md5: e92548e5df1c13595118c9d4fae7afd2
Issue Description:
As @gribozavr writes on the discussion on #2431
> I'm also thinking about changing the add_swift_library
function to get an explicit annotation about the library: whether it is only shared, only static, or defers to the general stdlib policy. For example, we want libswiftReflection
to always be static, and libswiftRemoteMirror
to always be shared, so that libswiftRemoteMirror.dylib
does not have other runtime dependencies.
> The primary issue is that currently the CMake code is not set up around static/shared libraries; it builds a "primary" one (which is usually static for compiler components and shared for the standard library), and then it can build a secondary one, which is static for the standard library. I have started that work with #2809 but we're not done yet.
Making this improvement would also make it easier to build the feature from #2431 the ability to build only static versions of the static libraries.