aboutsummaryrefslogtreecommitdiff
path: root/go/private/rules/binary.bzl
diff options
context:
space:
mode:
authorIan Cottrell <ian.the.hat@gmail.com>2017-12-22 18:59:29 -0500
committerGitHub <noreply@github.com>2017-12-22 18:59:29 -0500
commita2972afe2d3895e762afb7c2075b08dfbada6643 (patch)
tree3af5af437afaf78772e9a316c222cc2dffd0fe14 /go/private/rules/binary.bzl
parente0048a9f6754d5e41f821c65c92bfe7dffda163f (diff)
downloadbazelbuild-rules_go-a2972afe2d3895e762afb7c2075b08dfbada6643.tar.gz
Support transitive stamping (#1178)
* Support transitive stamping go_library rules now support the x_def attribute. The GoSource provider carries these to the archive. The GoArchive provider carries the x_def values from it's GoSource as well as from the full transitive set of archives it depends on. If an x_def entry has no package it is given the importpath of the library the GoSource was built from. Fixes #628 * Add some doucmentatin for stamping
Diffstat (limited to 'go/private/rules/binary.bzl')
-rw-r--r--go/private/rules/binary.bzl4
1 files changed, 3 insertions, 1 deletions
diff --git a/go/private/rules/binary.bzl b/go/private/rules/binary.bzl
index 8aae2440..659d5397 100644
--- a/go/private/rules/binary.bzl
+++ b/go/private/rules/binary.bzl
@@ -35,6 +35,9 @@ load("@io_bazel_rules_go//go/platform:list.bzl",
def _go_binary_impl(ctx):
"""go_binary_impl emits actions for compiling and linking a go executable."""
go = go_context(ctx)
+ if ctx.attr.linkstamp:
+ print("DEPRECATED: linkstamp, please use x_def for all stamping now {}".format(ctx.attr.linkstamp))
+
library = go.new_library(go, importable=False)
source = go.library_to_source(go, ctx.attr, library, ctx.coverage_instrumented())
name = ctx.attr.basename
@@ -44,7 +47,6 @@ def _go_binary_impl(ctx):
name = name,
source = source,
gc_linkopts = gc_linkopts(ctx),
- x_defs = ctx.attr.x_defs,
linkstamp=ctx.attr.linkstamp,
version_file=ctx.version_file,
info_file=ctx.info_file,