-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add -no-toolchain-stdlib-rpath
flag.
#27207
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
Add -no-toolchain-stdlib-rpath
flag.
#27207
Conversation
Add `-no-toolchain-stdlib-rpath` flag: the negative version of `-toolchain-stdlib-rpath`. Make `-no-toolchain-stdlib-rpath` be the default: use `/usr/lib/swift` as default RPATH on Darwin platforms instead of toolchain standard library. Adapted from swiftlang#27206. tensorflow branch requires the opposite default (use toolchain standard library as RPATH) because some stdlib modules like TensorFlow do not exist in `/usr/lib/swift`.
Patch suggested by @brentdax, to minimize the diff between |
To test this, I would add test cases to |
Done in 9a1b3f2. I added I added mirror tests in the |
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.
This seems all right to me. I'm not quite sure what the future of -toolchain-stdlib-rpath
mode is on Apple platforms at all, but it seems like the same things we need for testing the master stdlib also apply to using the TensorFlow stdlib.
(A bunch of this might get reorganized too as part of the "generalize cross-compilation and SDK layouts" work described on the forums. But for now this is good.)
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.
We should settle the help text question, but otherwise this LGTM.
e68c24d
to
adce3fb
Compare
Thank you for the helpful context. Thanks to reviewers! |
@swift-ci Please test |
Build failed |
Build failed |
Add
-no-toolchain-stdlib-rpath
flag: the negative version of-toolchain-stdlib-rpath
.Make
-no-toolchain-stdlib-rpath
be the default: use/usr/lib/swift
asdefault RPATH on Darwin platforms instead of toolchain standard library.
Adapted from #27206.
tensorflow branch requires the opposite default (use toolchain standard
library as RPATH) because some stdlib modules like TensorFlow do not exist in
/usr/lib/swift
.