Open
Description
This issue filed in swiftlang/swift finds that the libswiftCxx.a
and libswiftCxxStdlib.a
libraries are installed in usr/lib/swift/linux
instead of the correct directory of usr/lib/swift_static/linux
. This causes the use of the --static-swift-stdlib
flag to not work for projects that are enabled for C++ interop:
$ swift build --swift-sdk 6.0.3-RELEASE_ubuntu_jammy_aarch64 -Xswiftc -cxx-interoperability-mode=default --static-swift-stdlib
Building for debugging...
error: link command failed with exit code 1 (use -v to see invocation)
ld.lld: error: unable to find library -lswiftCxx
ld.lld: error: unable to find library -lswiftCxxStdlib
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
error: fatalError
[5/6] Linking swift-hello
This has apparently been present in various versions of Swift and has not been fixed yet, so my proposal is to work around this issue temporarily in generated Swift SDKs by manually moving the libswiftCxx.a
and libswiftCxxStdlib.a
into the swift_static/linux directory to avoid this issue, since we know it is a problem.
Metadata
Metadata
Assignees
Labels
No labels