mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The install_name trick we are using to make sure that an application built with a deployment target new enough to *guarantee* that Swift will be available in the OS (and therefore don't need dylibs bundled) link directly to /usr/lib/swift/*.dylib, but rewrites the the library paths to be rpath-relative for older OS's (e.g., @rpath/lib/swift/libswiftCore.dylib) doesn't work for sub-minor version numbers, e.g., the tools can't distinguish between 10.14.4 and 10.14. Therefore, macOS 10.14 is both an "older OS" and a "newer OS". Hack around the primary problem caused by this---the inability of first-party Swift programs to launch on macOS 10.14.4---by treating macOS 10.14 as an "older OS" when building for the Xcode toolchain (which is used by anyone who will deploy back to an older OS, e.g., 3rd party applications) but treat it as a "newer OS" when building for the OS toolchains (which is used when building the OS itself). Fixes rdar://problem/47007519.