github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/ring0/gen_offsets/BUILD (about) 1 load("//tools:defs.bzl", "go_binary") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package(licenses = ["notice"]) 5 6 go_template_instance( 7 name = "defs_impl_arm64", 8 out = "defs_impl_arm64.go", 9 package = "main", 10 template = "//pkg/ring0:defs_arm64", 11 ) 12 13 go_template_instance( 14 name = "defs_impl_amd64", 15 out = "defs_impl_amd64.go", 16 package = "main", 17 template = "//pkg/ring0:defs_amd64", 18 ) 19 20 go_binary( 21 name = "gen_offsets", 22 srcs = [ 23 "defs_impl_amd64.go", 24 "defs_impl_arm64.go", 25 "main.go", 26 ], 27 # Use the libc malloc to avoid any extra dependencies. This is required to 28 # pass the sentry deps test. 29 system_malloc = True, 30 visibility = [ 31 "//pkg/ring0:__pkg__", 32 "//pkg/sentry/platform/kvm:__pkg__", 33 ], 34 deps = [ 35 "//pkg/cpuid", 36 "//pkg/hostarch", 37 "//pkg/ring0/pagetables", 38 "//pkg/sentry/arch", 39 "//pkg/sentry/arch/fpu", 40 ], 41 )