github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/sentry/kernel/epoll/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  package(licenses = ["notice"])
     5  
     6  go_template_instance(
     7      name = "epoll_list",
     8      out = "epoll_list.go",
     9      package = "epoll",
    10      prefix = "pollEntry",
    11      template = "//pkg/ilist:generic_list",
    12      types = {
    13          "Element": "*pollEntry",
    14          "Linker": "*pollEntry",
    15      },
    16  )
    17  
    18  go_library(
    19      name = "epoll",
    20      srcs = [
    21          "epoll.go",
    22          "epoll_list.go",
    23          "epoll_state.go",
    24      ],
    25      visibility = ["//pkg/sentry:internal"],
    26      deps = [
    27          "//pkg/abi/linux",
    28          "//pkg/context",
    29          "//pkg/refs",
    30          "//pkg/sentry/fs",
    31          "//pkg/sentry/fs/anon",
    32          "//pkg/sentry/fs/fsutil",
    33          "//pkg/sync",
    34          "//pkg/usermem",
    35          "//pkg/waiter",
    36          "@org_golang_x_sys//unix:go_default_library",
    37      ],
    38  )
    39  
    40  go_test(
    41      name = "epoll_test",
    42      size = "small",
    43      srcs = [
    44          "epoll_test.go",
    45      ],
    46      library = ":epoll",
    47      deps = [
    48          "//pkg/sentry/contexttest",
    49          "//pkg/sentry/fs/filetest",
    50          "//pkg/waiter",
    51      ],
    52  )