Skip to content
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

Upstream Driver changes for Swift-in-Apple-OSs #24787

Merged
merged 12 commits into from
Aug 2, 2019

Conversation

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented May 14, 2019

Cherry-pick a bunch of changes that deal with the Swift stdlib and overlays living in /usr/lib/swift/, mostly from Graydon before he left the Swift project. These changes shipped in Apple Swift 5.0 but never made it back to open source.

(not urgent at this point because we're so late with it)

rdar://problem/50748941

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

// scenarios of deploying for swift-in-the-OS. We keep it here as an
// optional behaviour so that people downloading snapshot toolchains for
// testing new stdlibs will be able to link to the stdlib bundled in that
// toolchain.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We worked out all these careful details about how to deal with Swift in downloadable toolchains differently from Swift in Xcode. Do we have to do any tweaks to the downloadable toolchain configuration? @bob-wilson @Rostepher @shahmishal

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that is all in place now, e.g., #20578

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the context, this is a little different. We don't expect this option to be used on Apple platforms with Swift-in-the-OS, but keeping the support in the compiler seems harmless.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please Build Toolchain macOS Platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ebaab1ecb96232c2ae8271ee9e966cd305b56bca

@jrose-apple
Copy link
Contributor Author

Oops. Guess I forgot a cherry-pick.

@jrose-apple
Copy link
Contributor Author

…oops, I didn't mean to put this in the main repo. Oh well, that's fine.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ebaab1ecb96232c2ae8271ee9e966cd305b56bca

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please Build Toolchain macOS Platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ebaab1ecb96232c2ae8271ee9e966cd305b56bca

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ebaab1ecb96232c2ae8271ee9e966cd305b56bca

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci test

@jrose-apple
Copy link
Contributor Author

*grumble grumble*

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9a55399

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9a55399

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9c1686b

include/swift/Option/Options.td Show resolved Hide resolved
@jrose-apple
Copy link
Contributor Author

LLDB failure might indicate something else that needs upstreaming; I'll take a look later.

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1588
@swift-ci test

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1588
@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Aug 1, 2019

Build failed
Swift Test Linux Platform
Git Sha - c9a4064

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Aug 2, 2019

Build failed
Swift Test OS X Platform
Git Sha - c9a4064

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1588
@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1588
@swift-ci Please test Linux

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1588
@swift-ci Please smoke test

@swift-ci
Copy link
Contributor

swift-ci commented Aug 2, 2019

Build failed
Swift Test OS X Platform
Git Sha - c9a4064

@swift-ci
Copy link
Contributor

swift-ci commented Aug 2, 2019

Build failed
Swift Test Linux Platform
Git Sha - c9a4064

@jrose-apple
Copy link
Contributor Author

Full tests explicitly cancelled because we ran them earlier and I want to get this merged.

@jrose-apple jrose-apple merged commit fab8d3d into master Aug 2, 2019
@jrose-apple jrose-apple deleted the on-the-rpath-to-greatness branch August 2, 2019 21:40
dan-zheng added a commit to dan-zheng/swift that referenced this pull request Sep 16, 2019
Previously, the default RPATH was set to `/usr/lib/swift`.
This caused linker issues on macOS, as tensorflow-branch-specific modules like
TensorFlow and Python do not exist in `/usr/lib/swift`.

This patch defaults the `-toolchain-stdlib-rpath` flag to be true, so the
default RPATH is the toolchain standard library instead of `/usr/lib/swift`.

With this default, the linker issues are fixed. A `-no-toolchain-stdlib-path`
flag is added to opt out of this default, making `/usr/lib/swift` the RPATH.

Add positive/negative tests.
`swift test` works on macOS for packages that import/use TensorFlow again.

Partially reverts swiftlang#24787.
Resolves TF-797.
dan-zheng added a commit that referenced this pull request Sep 17, 2019
…` on macOS. (#27206)

Previously, the default RPATH was set to `/usr/lib/swift`.
This caused linker issues on macOS, as tensorflow-branch-specific modules like
TensorFlow and Python do not exist in `/usr/lib/swift`.

This patch defaults the `-toolchain-stdlib-rpath` flag to be true, so the
default RPATH is the toolchain standard library instead of `/usr/lib/swift`.

With this default, the linker issues are fixed. A `-no-toolchain-stdlib-path`
flag is added to opt out of this default, making `/usr/lib/swift` the RPATH.

Add positive/negative tests.
`swift test` works on macOS for packages that import/use TensorFlow again.

Partially reverts #24787.
Resolves TF-797.
dan-zheng added a commit that referenced this pull request Sep 17, 2019
…` on macOS. (#27206)

Previously, the default RPATH was set to `/usr/lib/swift`.
This caused linker issues on macOS, as tensorflow-branch-specific modules like
TensorFlow and Python do not exist in `/usr/lib/swift`.

This patch defaults the `-toolchain-stdlib-rpath` flag to be true, so the
default RPATH is the toolchain standard library instead of `/usr/lib/swift`.

With this default, the linker issues are fixed. A `-no-toolchain-stdlib-path`
flag is added to opt out of this default, making `/usr/lib/swift` the RPATH.

Add positive/negative tests.
`swift test` works on macOS for packages that import/use TensorFlow again.

Partially reverts #24787.
Resolves TF-797.
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