Description
Description
I was just building the toolchain natively on Android when this potential issue struck me. We build the Swift toolchain for linux on all the current CI branches with an older Swift 5.8.1 compiler, then set its runpath to the newer Swift stdlib it ships with:
> readelf -d swift-5.10.1-RELEASE-fedora39/usr/bin/swift-frontend | ag runpath
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../lib/swift/linux:$ORIGIN/../lib/swift/host]
This probably worked fine before when we bootstrapped the compiler against the new stdlib first, but now that we are only building the Swift compiler with the prebuilt 5.8.1 hosttools, this means the newer stdlib cannot change any of its ABI or behavior used by the compiler itself, or it will cause problems.
A potential solution is to start shipping the Swift 5.8.1 stdlib also with the toolchain, so the newer Swift stdlib is free to keep changing.
I have not observed any problems with this setup yet, but this move is fairly recent.
@etcwilde, @bnbarham, or @shahmishal, let me know what you think.
Reproduction
None
Expected behavior
See above
Environment
Swift 5.9 onwards
Additional information
No response