Skip to content

Commit 3b66d4f

Browse files
committed
Tweak nogo archive handling
1 parent dfbf8b1 commit 3b66d4f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

go/private/rules/nogo.bzl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ def _nogo_impl(ctx):
4747
if ctx.attr.debug:
4848
nogo_args.add("-debug")
4949
nogo_inputs = []
50-
analyzer_archives = [get_archive(dep) for dep in ctx.attr.deps]
51-
analyzer_importpaths = [archive.data.importpath for archive in analyzer_archives]
52-
nogo_args.add_all(analyzer_importpaths, before_each = "-analyzer_importpath")
50+
for dep in ctx.attr.deps:
51+
nogo_args.add("-analyzer_importpath", dep[GoArchive].data.importpath)
5352
if ctx.file.config:
5453
nogo_args.add("-config", ctx.file.config)
5554
nogo_inputs.append(ctx.file.config)
@@ -76,7 +75,7 @@ def _nogo_impl(ctx):
7675
nogo_source = go.library_to_source(go, struct(
7776
srcs = [struct(files = [nogo_main])],
7877
embed = [ctx.attr._nogo_srcs],
79-
deps = analyzer_archives,
78+
deps = ctx.attr.deps,
8079
), nogo_library, False)
8180
_, executable, runfiles = go.binary(
8281
go,

0 commit comments

Comments
 (0)