Skip to content

Commit

Permalink
Clean up rpath handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed May 12, 2022
1 parent 1a75eac commit 0c9a414
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions go/private/actions/link.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ load(
)
load(
"//go/private:mode.bzl",
"LINKMODE_C_SHARED",
"LINKMODE_NORMAL",
"LINKMODE_PLUGIN",
"extld_from_cc_toolchain",
Expand Down Expand Up @@ -108,13 +107,6 @@ def emit_link(
if go.mode.link == LINKMODE_PLUGIN:
tool_args.add("-pluginpath", archive.data.importpath)

# TODO: Rework when https://github.com/bazelbuild/bazel/pull/12304 is mainstream
if go.mode.link == LINKMODE_C_SHARED and (go.mode.goos in ["darwin", "ios"]):
extldflags.extend([
"-install_name",
rpath.install_name(executable),
])

arcs = _transitive_archives_without_test_archives(archive, test_archives)
arcs.extend(test_archives)
if (go.coverage_enabled and go.coverdata and
Expand Down
6 changes: 0 additions & 6 deletions go/private/rules/binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ load(
"LINKMODE_PLUGIN",
"LINKMODE_SHARED",
)
load(
"//go/private:rpath.bzl",
"rpath",
)

_EMPTY_DEPSET = depset([])

Expand All @@ -70,8 +66,6 @@ def new_cc_import(
static_library = None,
alwayslink = False,
linkopts = []):
if dynamic_library:
linkopts = linkopts + rpath.flags(go, dynamic_library)
return CcInfo(
compilation_context = cc_common.create_compilation_context(
defines = defines,
Expand Down

0 comments on commit 0c9a414

Please sign in to comment.