swift
b45f2db9 - [TF] Set default RPATH to toolchain stdlib instead of `/usr/lib/swift` on macOS. (#27206)

Commit
6 years ago
[TF] Set default RPATH to toolchain stdlib instead of `/usr/lib/swift` 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 https://github.com/apple/swift/pull/24787. Resolves TF-797.
Author
Parents
Loading