diff options
author | Andrei Vagin <avagin@google.com> | 2019-04-01 12:52:19 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-01 12:53:27 -0700 |
commit | a4b34e26372528ef60140acef0b7c1ab1934f82a (patch) | |
tree | 3d308e07c065191dd0c4f0e30553eb21666c6969 /pkg/waiter/BUILD | |
parent | 0327931ca41de892dcdae4fd6a7123cea5b0b2f0 (diff) |
gvisor: convert ilist to ilist:generic_list
ilist:generic_list works faster (cl/240185278) and
the code looks cleaner without type casting.
PiperOrigin-RevId: 241381175
Change-Id: I8487ab1d73637b3e9733c253c56dce9e79f0d35f
Diffstat (limited to 'pkg/waiter/BUILD')
-rw-r--r-- | pkg/waiter/BUILD | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/pkg/waiter/BUILD b/pkg/waiter/BUILD index b748246da..48ce063d7 100644 --- a/pkg/waiter/BUILD +++ b/pkg/waiter/BUILD @@ -1,13 +1,28 @@ package(licenses = ["notice"]) +load("//tools/go_generics:defs.bzl", "go_template_instance") load("//tools/go_stateify:defs.bzl", "go_library", "go_test") +go_template_instance( + name = "waiter_list", + out = "waiter_list.go", + package = "waiter", + prefix = "waiter", + template = "//pkg/ilist:generic_list", + types = { + "Element": "*Entry", + "Linker": "*Entry", + }, +) + go_library( name = "waiter", - srcs = ["waiter.go"], + srcs = [ + "waiter.go", + "waiter_list.go", + ], importpath = "gvisor.googlesource.com/gvisor/pkg/waiter", visibility = ["//visibility:public"], - deps = ["//pkg/ilist"], ) go_test( @@ -18,3 +33,11 @@ go_test( ], embed = [":waiter"], ) + +filegroup( + name = "autogen", + srcs = [ + "waiter_list.go", + ], + visibility = ["//:sandbox"], +) |