gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/devices/nvproxy/BUILD (about) 1 load("//pkg/sync/locking:locking.bzl", "declare_mutex") 2 load("//tools:defs.bzl", "go_library", "go_test") 3 load("//tools/go_generics:defs.bzl", "go_template_instance") 4 5 package(default_applicable_licenses = ["//:license"]) 6 7 licenses(["notice"]) 8 9 declare_mutex( 10 name = "fds_mutex", 11 out = "fds_mutex.go", 12 package = "nvproxy", 13 prefix = "fds", 14 ) 15 16 declare_mutex( 17 name = "objs_mutex", 18 out = "objs_mutex.go", 19 package = "nvproxy", 20 prefix = "objs", 21 ) 22 23 go_template_instance( 24 name = "object_free_list", 25 out = "object_free_list.go", 26 package = "nvproxy", 27 prefix = "objectFree", 28 template = "//pkg/ilist:generic_list", 29 types = { 30 "Element": "*object", 31 "Linker": "*object", 32 }, 33 ) 34 35 go_library( 36 name = "nvproxy", 37 srcs = [ 38 "fds_mutex.go", 39 "frontend.go", 40 "frontend_mmap.go", 41 "frontend_unsafe.go", 42 "nvproxy.go", 43 "nvproxy_unsafe.go", 44 "object.go", 45 "object_free_list.go", 46 "objs_mutex.go", 47 "save_restore.go", 48 "save_restore_impl.go", 49 "seccomp_filters.go", 50 "uvm.go", 51 "uvm_mmap.go", 52 "uvm_unsafe.go", 53 "version.go", 54 ], 55 visibility = [ 56 "//pkg/sentry:internal", 57 "//tools/gpu:__subpackages__", 58 ], 59 deps = [ 60 "//pkg/abi/linux", 61 "//pkg/abi/nvgpu", 62 "//pkg/cleanup", 63 "//pkg/context", 64 "//pkg/devutil", 65 "//pkg/errors/linuxerr", 66 "//pkg/fdnotifier", 67 "//pkg/hostarch", 68 "//pkg/log", 69 "//pkg/marshal", 70 "//pkg/marshal/primitive", 71 "//pkg/safemem", 72 "//pkg/seccomp", 73 "//pkg/sentry/arch", 74 "//pkg/sentry/kernel", 75 "//pkg/sentry/memmap", 76 "//pkg/sentry/mm", 77 "//pkg/sentry/vfs", 78 "//pkg/sync", 79 "//pkg/sync/locking", 80 "//pkg/usermem", 81 "//pkg/waiter", 82 "@org_golang_x_sys//unix:go_default_library", 83 ], 84 ) 85 86 go_test( 87 name = "nvproxy_test", 88 srcs = ["nvproxy_test.go"], 89 library = ":nvproxy", 90 )