diff options
| author | bors <bors@rust-lang.org> | 2016-12-18 04:38:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-18 04:38:27 +0000 |
| commit | d54e72317998cfe1df90256ad0669dd193cf2f66 (patch) | |
| tree | 5b78018b6c394f0ec47cc0b9837b2315e8c3012f /src/rustllvm/RustWrapper.cpp | |
| parent | 32d02bbafa26c4986428669c7aefc231b0cc3915 (diff) | |
| parent | 1b8e6c152c827751ee22bf8cfca6f6ca4ade2798 (diff) | |
| download | rust-d54e72317998cfe1df90256ad0669dd193cf2f66.tar.gz rust-d54e72317998cfe1df90256ad0669dd193cf2f66.zip | |
Auto merge of #38440 - alexcrichton:fix-osx-nightlies, r=brson
rustbuild: Fix LC_ID_DYLIB directives on OSX
Currently libraries installed by rustbuild on OSX have an incorrect
`LC_ID_DYLIB` directive located in the dynamic libraries that are
installed. The directive we expect looks like:
@rpath/libstd.dylib
Which means that if you want to find that dynamic library you should
look at the dylib's other `@rpath` directives. Typically our `@rpath`
directives look like `@loader_path/../lib` for the compiler as that's
where the installed libraries will be located. Currently, though,
rustbuild produces dylibs with the directive that looks like:
/Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib
In other words, the build directory is encoded erroneously. The compiler
already [knows how] to change this directive, but it only passes that
argument when `-C rpath` is also passed. The rustbuild system, however,
explicitly [does not pass] this option explicitly and instead bakes its
own. This logic then also erroneously didn't pass `-Wl,-install_name`
like the compiler.
[knows how]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214
[does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/bootstrap/bin/rustc.rs#L133-L158
To fix this regression this patch introduces a new `-Z` flag, `-Z
osx-rpath-install-name` which basically just forces the compiler to take
the previous `-install_name` branch when creating a dynamic library.
Hopefully we can sort out a better rpath story in the future, but for
now this "hack" should suffice in getting our nightly builds back to the
same state as before.
Closes #38430
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
