Skip to content

Conversation

@mikeash
Copy link
Contributor

@mikeash mikeash commented Mar 20, 2019

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.

@mikeash
Copy link
Contributor Author

mikeash commented Mar 20, 2019

@swift-ci please test

@gottesmm gottesmm self-requested a review March 20, 2019 21:12
Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@mikeash
Copy link
Contributor Author

mikeash commented Mar 20, 2019

@swift-ci please test

1 similar comment
@mikeash
Copy link
Contributor Author

mikeash commented Mar 21, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 339170e431c8998cb75393f8572baa06e022334a

@mikeash mikeash force-pushed the magic-symbols-for-install-name branch from 339170e to 6b5a7ba Compare March 21, 2019 17:13
@mikeash
Copy link
Contributor Author

mikeash commented Mar 21, 2019

@swift-ci please test and merge

3 similar comments
@mikeash
Copy link
Contributor Author

mikeash commented Mar 21, 2019

@swift-ci please test and merge

@mikeash
Copy link
Contributor Author

mikeash commented Mar 21, 2019

@swift-ci please test and merge

@shahmishal
Copy link
Member

@swift-ci please test and merge

mikeash and others added 3 commits March 22, 2019 10:04
…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.
@mikeash mikeash force-pushed the magic-symbols-for-install-name branch from 6b5a7ba to 50a09e6 Compare March 22, 2019 15:38
@mikeash mikeash force-pushed the magic-symbols-for-install-name branch from 50a09e6 to 26d44d5 Compare March 22, 2019 15:41
@mikeash
Copy link
Contributor Author

mikeash commented Mar 22, 2019

@swift-ci please test and merge

1 similar comment
@mikeash
Copy link
Contributor Author

mikeash commented Mar 22, 2019

@swift-ci please test and merge

@mikeash
Copy link
Contributor Author

mikeash commented Mar 26, 2019

@swift-ci please test osx platform

@mikeash
Copy link
Contributor Author

mikeash commented Mar 27, 2019

@swift-ci Please smoke test OS X platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants