gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/lisafs/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  package(
     5      default_applicable_licenses = ["//:license"],
     6      default_visibility = ["//visibility:public"],
     7      licenses = ["notice"],
     8  )
     9  
    10  go_template_instance(
    11      name = "control_fd_refs",
    12      out = "control_fd_refs.go",
    13      package = "lisafs",
    14      prefix = "controlFD",
    15      template = "//pkg/refs:refs_template",
    16      types = {
    17          "T": "ControlFD",
    18      },
    19  )
    20  
    21  go_template_instance(
    22      name = "open_fd_refs",
    23      out = "open_fd_refs.go",
    24      package = "lisafs",
    25      prefix = "openFD",
    26      template = "//pkg/refs:refs_template",
    27      types = {
    28          "T": "OpenFD",
    29      },
    30  )
    31  
    32  go_template_instance(
    33      name = "bound_socket_fd_refs",
    34      out = "bound_socket_fd_refs.go",
    35      package = "lisafs",
    36      prefix = "boundSocketFD",
    37      template = "//pkg/refs:refs_template",
    38      types = {
    39          "T": "BoundSocketFD",
    40      },
    41  )
    42  
    43  go_template_instance(
    44      name = "node_fd_refs",
    45      out = "node_fd_refs.go",
    46      package = "lisafs",
    47      prefix = "node",
    48      template = "//pkg/refs:refs_template",
    49      types = {
    50          "T": "Node",
    51      },
    52  )
    53  
    54  go_template_instance(
    55      name = "control_fd_list",
    56      out = "control_fd_list.go",
    57      package = "lisafs",
    58      prefix = "controlFD",
    59      template = "//pkg/ilist:generic_list",
    60      types = {
    61          "Element": "*ControlFD",
    62          "Linker": "*ControlFD",
    63      },
    64  )
    65  
    66  go_template_instance(
    67      name = "open_fd_list",
    68      out = "open_fd_list.go",
    69      package = "lisafs",
    70      prefix = "openFD",
    71      template = "//pkg/ilist:generic_list",
    72      types = {
    73          "Element": "*OpenFD",
    74          "Linker": "*OpenFD",
    75      },
    76  )
    77  
    78  go_library(
    79      name = "lisafs",
    80      srcs = [
    81          "bound_socket_fd_refs.go",
    82          "channel.go",
    83          "client.go",
    84          "client_file.go",
    85          "communicator.go",
    86          "connection.go",
    87          "control_fd_list.go",
    88          "control_fd_refs.go",
    89          "fd.go",
    90          "handlers.go",
    91          "lisafs.go",
    92          "message.go",
    93          "node.go",
    94          "node_fd_refs.go",
    95          "open_fd_list.go",
    96          "open_fd_refs.go",
    97          "sample_message.go",
    98          "server.go",
    99          "sock.go",
   100      ],
   101      marshal = True,
   102      deps = [
   103          "//pkg/abi/linux",
   104          "//pkg/atomicbitops",
   105          "//pkg/cleanup",
   106          "//pkg/context",
   107          "//pkg/fdchannel",
   108          "//pkg/flipcall",
   109          "//pkg/fspath",
   110          "//pkg/hostarch",
   111          "//pkg/log",
   112          "//pkg/marshal/primitive",
   113          "//pkg/p9",
   114          "//pkg/refs",
   115          "//pkg/sync",
   116          "//pkg/unet",
   117          "@org_golang_x_sys//unix:go_default_library",
   118      ],
   119  )
   120  
   121  go_test(
   122      name = "sock_test",
   123      size = "small",
   124      srcs = ["sock_test.go"],
   125      library = ":lisafs",
   126      deps = [
   127          "//pkg/marshal",
   128          "//pkg/sync",
   129          "//pkg/unet",
   130          "@org_golang_x_sys//unix:go_default_library",
   131      ],
   132  )
   133  
   134  go_test(
   135      name = "connection_test",
   136      size = "small",
   137      srcs = ["connection_test.go"],
   138      deps = [
   139          ":lisafs",
   140          "//pkg/abi/linux",
   141          "//pkg/sync",
   142          "//pkg/unet",
   143          "@org_golang_x_sys//unix:go_default_library",
   144      ],
   145  )
   146  
   147  go_test(
   148      name = "node_test",
   149      size = "small",
   150      srcs = ["node_test.go"],
   151      library = ":lisafs",
   152  )