SE-0342: Statically link Swift runtime libraries by default on supported platforms

Big +1 from my side. As mentioned in lot's of other comments, as long as Swift does not guarantee ABI stability on Linux, the safe option is statically linking the runtime libs. I strongly agree, that Swift should default to the safe option.

Besides that: In my opinion this change will make Swift server side development easier to pick up. As a server app compiled with a Swift toolchain for a given linux distribution, will likely work on the same distribution and not require a toolchain to be installed first. Those benefits can be seen today, when developing for AWS Lambda and using the static runtime flags.

Further this leads us to be able to potentially drop the slim docker images – that were never that slim :wink:. Statically linking the runtime libs is a way better option here.

Lastly as LTO support is something that is looked into, the overall binary size will decrease once LTO support has landed, as only the parts of the runtime libs remain in the executable that are actually needed.

1 Like