summaryrefslogtreecommitdiffhomepage
path: root/pkg/lisafs/BUILD
blob: 313c1756d04a6db612848230e0d62084dfc73e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
load("//tools:defs.bzl", "go_library", "go_test")
load("//tools/go_generics:defs.bzl", "go_template_instance")

package(
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],
)

go_template_instance(
    name = "control_fd_refs",
    out = "control_fd_refs.go",
    package = "lisafs",
    prefix = "controlFD",
    template = "//pkg/refsvfs2:refs_template",
    types = {
        "T": "ControlFD",
    },
)

go_template_instance(
    name = "open_fd_refs",
    out = "open_fd_refs.go",
    package = "lisafs",
    prefix = "openFD",
    template = "//pkg/refsvfs2:refs_template",
    types = {
        "T": "OpenFD",
    },
)

go_template_instance(
    name = "control_fd_list",
    out = "control_fd_list.go",
    package = "lisafs",
    prefix = "controlFD",
    template = "//pkg/ilist:generic_list",
    types = {
        "Element": "*ControlFD",
        "Linker": "*ControlFD",
    },
)

go_template_instance(
    name = "open_fd_list",
    out = "open_fd_list.go",
    package = "lisafs",
    prefix = "openFD",
    template = "//pkg/ilist:generic_list",
    types = {
        "Element": "*OpenFD",
        "Linker": "*OpenFD",
    },
)

go_library(
    name = "lisafs",
    srcs = [
        "channel.go",
        "client.go",
        "client_file.go",
        "communicator.go",
        "connection.go",
        "control_fd_list.go",
        "control_fd_refs.go",
        "fd.go",
        "handlers.go",
        "lisafs.go",
        "message.go",
        "open_fd_list.go",
        "open_fd_refs.go",
        "sample_message.go",
        "server.go",
        "sock.go",
    ],
    marshal = True,
    deps = [
        "//pkg/abi/linux",
        "//pkg/cleanup",
        "//pkg/context",
        "//pkg/fdchannel",
        "//pkg/flipcall",
        "//pkg/fspath",
        "//pkg/hostarch",
        "//pkg/log",
        "//pkg/marshal/primitive",
        "//pkg/p9",
        "//pkg/refsvfs2",
        "//pkg/sync",
        "//pkg/unet",
        "@org_golang_x_sys//unix:go_default_library",
    ],
)

go_test(
    name = "sock_test",
    size = "small",
    srcs = ["sock_test.go"],
    library = ":lisafs",
    deps = [
        "//pkg/marshal",
        "//pkg/sync",
        "//pkg/unet",
        "@org_golang_x_sys//unix:go_default_library",
    ],
)

go_test(
    name = "connection_test",
    size = "small",
    srcs = ["connection_test.go"],
    deps = [
        ":lisafs",
        "//pkg/sync",
        "//pkg/unet",
        "@org_golang_x_sys//unix:go_default_library",
    ],
)