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

Enables runtime linking for darwin platforms #766

Merged
merged 1 commit into from
Jun 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,12 @@ def _compute_rpaths(toolchain, output_dir, dep_info):
dylibs = [lib for lib in preferreds if lib.basename.endswith(toolchain.dylib_ext) or lib.basename.split(".", 2)[1] == toolchain.dylib_ext[1:]]
if not dylibs:
return depset([])
if toolchain.os != "linux":

# For darwin, dylibs compiled by Bazel will fail to be resolved at runtime
# without a version of Bazel that includes
# https://github.com/bazelbuild/bazel/pull/13427. This is known to not be
# included in Bazel 4.1 and below.
if toolchain.os != "linux" and toolchain.os != "darwin":
fail("Runtime linking is not supported on {}, but found {}".format(
toolchain.os,
dep_info.transitive_noncrates,
Expand Down