diff options
author | Adin Scannell <ascannell@google.com> | 2020-10-28 17:25:58 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-28 17:28:03 -0700 |
commit | b4b42a5fce4cdd134d7d28d96ae7d4862791d911 (patch) | |
tree | 6d0d4b345ac90a87dd2c95dce5ea9e5ca4bf8d94 /tools/bazeldefs/go.bzl | |
parent | d20ef61a839efa19bed44a1cfa4a30a247056ffe (diff) |
Traversal embedded libraries, even for go_library rules.
PiperOrigin-RevId: 339570821
Diffstat (limited to 'tools/bazeldefs/go.bzl')
-rw-r--r-- | tools/bazeldefs/go.bzl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/bazeldefs/go.bzl b/tools/bazeldefs/go.bzl index d388346a5..661c9727e 100644 --- a/tools/bazeldefs/go.bzl +++ b/tools/bazeldefs/go.bzl @@ -94,10 +94,10 @@ def go_rule(rule, implementation, **kwargs): toolchains = kwargs.get("toolchains", []) + ["@io_bazel_rules_go//go:toolchain"] return rule(implementation, attrs = attrs, toolchains = toolchains, **kwargs) -def go_test_library(target): - if hasattr(target.attr, "embed") and len(target.attr.embed) > 0: - return target.attr.embed[0] - return None +def go_embed_libraries(target): + if hasattr(target.attr, "embed"): + return target.attr.embed + return [] def go_context(ctx, goos = None, goarch = None, std = False): """Extracts a standard Go context struct. |