-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fix linker on Solaris/Illumos #35821
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
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
bbcad02
to
dfd8b4c
Compare
@bors: r+ dfd8b4c680457b70bd1efeefc1d2033d4a23fc4b Thanks! |
dfd8b4c
to
de8bb0c
Compare
Whoops, sorry - the build seems to be broken (code seems to be diverged a bit from 1.11). |
@bors: r+ de8bb0c0dc73fb47ca567318b88ad0582f65beb2 |
Solaris linker doesn't support the `--retain-symbols-file` option, so this patch provides version scripts as an alternative on that platform.
de8bb0c
to
c08b7b9
Compare
Oh well, that's a shame, I missed a single |
@bors: r+ |
📌 Commit c08b7b9 has been approved by |
Fix linker on Solaris/Illumos This patch provides a fix for the `GnuLinker::export_symbols` function that currently relies on a `--retain-symbols-file` option which is not supported by the Solaris & Illumos linker. Instead, a [version script](https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html) is used on this platform to achieve the same goal. Here's an example of a similar approach in LLVM's CMake script: https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/AddLLVM.cmake#L88-L94. Perhaps other platforms like OpenBSD could benefit from this as well. /cc @semarie
This patch provides a fix for the
GnuLinker::export_symbols
function that currently relies on a--retain-symbols-file
option which is not supported by the Solaris & Illumos linker.Instead, a version script is used on this platform to achieve the same goal. Here's an example of a similar approach in LLVM's CMake script: https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/AddLLVM.cmake#L88-L94.
Perhaps other platforms like OpenBSD could benefit from this as well. /cc @semarie