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

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  licenses(["notice"])
     5  
     6  go_template_instance(
     7      name = "dentry_list",
     8      out = "dentry_list.go",
     9      package = "gofer",
    10      prefix = "dentry",
    11      template = "//pkg/ilist:generic_list",
    12      types = {
    13          "Element": "*dentry",
    14          "Linker": "*dentry",
    15      },
    16  )
    17  
    18  go_template_instance(
    19      name = "fstree",
    20      out = "fstree.go",
    21      package = "gofer",
    22      prefix = "generic",
    23      template = "//pkg/sentry/vfs/genericfstree:generic_fstree",
    24      types = {
    25          "Dentry": "dentry",
    26      },
    27  )
    28  
    29  go_library(
    30      name = "gofer",
    31      srcs = [
    32          "dentry_list.go",
    33          "directory.go",
    34          "filesystem.go",
    35          "fstree.go",
    36          "gofer.go",
    37          "handle.go",
    38          "host_named_pipe.go",
    39          "p9file.go",
    40          "regular_file.go",
    41          "revalidate.go",
    42          "save_restore.go",
    43          "socket.go",
    44          "special_file.go",
    45          "symlink.go",
    46          "time.go",
    47      ],
    48      visibility = ["//pkg/sentry:internal"],
    49      deps = [
    50          "//pkg/abi/linux",
    51          "//pkg/context",
    52          "//pkg/errors/linuxerr",
    53          "//pkg/fd",
    54          "//pkg/fdnotifier",
    55          "//pkg/fspath",
    56          "//pkg/hostarch",
    57          "//pkg/log",
    58          "//pkg/metric",
    59          "//pkg/p9",
    60          "//pkg/refs",
    61          "//pkg/refsvfs2",
    62          "//pkg/safemem",
    63          "//pkg/sentry/fs/fsutil",
    64          "//pkg/sentry/fs/lock",
    65          "//pkg/sentry/fsimpl/host",
    66          "//pkg/sentry/fsmetric",
    67          "//pkg/sentry/hostfd",
    68          "//pkg/sentry/kernel",
    69          "//pkg/sentry/kernel/auth",
    70          "//pkg/sentry/kernel/pipe",
    71          "//pkg/sentry/kernel/time",
    72          "//pkg/sentry/memmap",
    73          "//pkg/sentry/pgalloc",
    74          "//pkg/sentry/platform",
    75          "//pkg/sentry/socket/control",
    76          "//pkg/sentry/socket/unix",
    77          "//pkg/sentry/socket/unix/transport",
    78          "//pkg/sentry/usage",
    79          "//pkg/sentry/vfs",
    80          "//pkg/sync",
    81          "//pkg/syserr",
    82          "//pkg/syserror",
    83          "//pkg/unet",
    84          "//pkg/usermem",
    85          "//pkg/waiter",
    86          "@org_golang_x_sys//unix:go_default_library",
    87      ],
    88  )
    89  
    90  go_test(
    91      name = "gofer_test",
    92      srcs = ["gofer_test.go"],
    93      library = ":gofer",
    94      deps = [
    95          "//pkg/p9",
    96          "//pkg/sentry/contexttest",
    97          "//pkg/sentry/pgalloc",
    98      ],
    99  )