Linux 上的 Swift:-static-stdlib 找不到 -lFoundation

Pet*_*haw 6 linux foundation swift

我正在尝试在 Linux 上构建一个使用 Foundation 的命令行工具。但我遇到了一个错误,因为我找不到解决方案:

swiftc -static-stdlib Sources/main.swift Sources/array.swift Sources/check.swift
/usr/bin/ld.gold: error: cannot find -lFoundation
/tmp/main-3a78a1.o:/tmp/main-3a78a1.o:function main: error: undefined reference to '_TMV10Foundation12CharacterSet'
/tmp/main-3a78a1.o:/tmp/main-3a78a1.o:function main: error: undefined reference to '_TWPV10Foundation12CharacterSets10SetAlgebraS_'
/tmp/main-3a78a1.o:/tmp/main-3a78a1.o:function main: error: undefined reference to '_TFE10FoundationSS10componentsfT11separatedByVS_12CharacterSet_GSaSS_'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

有人知道如何静态构建 swift 项目吗?