Is the Swift 6 dev snapshot toolchain supposed to be using system 5.10 runtime dylibs?

I'm running macOS 14.6.1 and I installed the 2024-09-11 dev snapshot of Swift 6 from swift.org. I have TOOLCHAINS=org.swift.600202409111a in my shell's environment and I've verified that eg. swift --version gives me Apple Swift version 6.0-dev. I'm using SwiftPM on the command line and not Xcode for all of this, although I did select the new toolchain in Xcode as well.

Now, I noticed that if I build one of my SwiftPM projects and look at the output of otool -L for the binary, all the libswift* dylibs it's using (like libswiftCore.dylib) are the ones under /usr/lib/swift even though the toolchain has them available under /Library/Developer/Toolchains/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-09-11-a.xctoolchain/usr/lib/swift/macosx.

Is this expected? Is the toolchain even supposed to use those dev snapshot dylibs in my case since I'm still on macOS 14 and not on the 15 beta?

1 Like

on macOS, Swift is ABI stable, so there is no requirement that the compiler version and runtime version match exactly.

Right, but I guess my question is whether I can make the Swift 6 toolchain use the Swift 6 runtime too? Seems odd that it's using the 5.10 one.

I did notice that clang and swiftc are getting called with -rpath /usr/lib/swift […] -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-09-11-a.xctoolchain/usr/lib/swift-5.5/macosx which was pretty weird considering there is no /usr/lib/swift-5.5/macosx under the toolchain, so somehow this feels like my rpath is wrong.

Edit: ah looks like that -rpath /usr/lib/swift and swift-5.5 linker rpath are only getting used with swift-case-paths for some reason. Still, it's odd that the binary I get only has runtime libs from under /usr/lib/swift