What libraries do I need to link with my static Swift Library?

I'm currently using SwiftPM to build a static library. I end up wanting to link that library as part of a separate build process with some C flags like -Lpath-to-my-library -lmy-library. Unsurprisingly, I need to link some core swift libraries as well. On macOS this seems to be handled via "auto linked libraries" so just adding something like -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift it automatically links libswiftCore and something called libswiftSwiftOnoneSupport.

On Linux, however, I need to manually specify these libraries (-lswiftCore -lswiftSwiftOnoneSupport). Is there a way to get the "correct" set of libraries to pass to the linker? For instance swiftSwiftOnoneSupport seems like it might be -Onone specific, and there might be some other libraries I may end up needing to link against as I use more of the core APIs.

Terms of Service

Privacy Policy

Cookie Policy