-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Build] Use magic linker symbols to specify an @rpath-relative install name when targeting pre-stable-ABI OSes. #23451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Use magic linker symbols to specify an @rpath-relative install name when targeting pre-stable-ABI OSes. #23451
Conversation
|
@swift-ci please test |
gottesmm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
|
@swift-ci please test |
1 similar comment
|
@swift-ci please test |
|
Build failed |
339170e to
6b5a7ba
Compare
|
@swift-ci please test and merge |
3 similar comments
|
@swift-ci please test and merge |
|
@swift-ci please test and merge |
|
@swift-ci please test and merge |
…l name when targeting pre-stable-ABI OSes. Magic symbols of the form $ld$install_name$os9.0$@rpath/libswiftCore.dylib tell the linker to use that install name when targeting that OS version. Use these symbols to specify an @rpath install name for all back-deployment libraries when targeting watchOS 2.0-5.1, iOS 7.0-12.1, and macOS 10.9-10.14. rdar://problem/45027809
…chain. 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.
6b5a7ba to
50a09e6
Compare
50a09e6 to
26d44d5
Compare
|
@swift-ci please test and merge |
1 similar comment
|
@swift-ci please test and merge |
|
@swift-ci please test osx platform |
|
@swift-ci Please smoke test OS X platform |
Magic symbols of the form
$ld$install_name$os9.0$@rpath/libswiftCore.dylibtell the linker to use that install name when targeting that OS version. Use these symbols to specify an@rpathinstall name for all back-deployment libraries when targeting watchOS 2.0-5.1, iOS 7.0-12.1, and macOS 10.9-10.14.