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

Big +1 on this for the reasons stated around static linking generally being the preferred approach on Linux.

Definitely, this is a small change that should improve the onboarding for non Apple platform developers wanting to use Swift since it's more similar to other programming languages.

I read all the related threads.

Similar to this comment [Pre-Pitch] Statically linking the Swift runtime libraries by default on Linux - #26 by NeoNacho I don't love the -runtimes portion of the suggested flag. I think stdlib fits a bit better in here, especially since I think runtime is an overloaded word with things like the clang runtime libraries. But I understand that a lot of these words are overloaded.

I think this is likely out of scope but I think it would be great if part of the solution here is putting in some effort to solve the potential sharp edges with this feature like SwiftSyntax does not work with --static-swift-stdlib so users didn't hit issues like this in libraries we control.

3 Likes