github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/bits/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance") 3 4 package(licenses = ["notice"]) 5 6 go_library( 7 name = "bits", 8 srcs = [ 9 "bits.go", 10 "bits32.go", 11 "bits64.go", 12 "uint64_arch.go", 13 "uint64_arch_amd64_asm.s", 14 "uint64_arch_arm64_asm.s", 15 "uint64_arch_generic.go", 16 ], 17 visibility = ["//:sandbox"], 18 ) 19 20 go_template( 21 name = "bits_template", 22 srcs = ["bits_template.go"], 23 types = [ 24 "T", 25 ], 26 ) 27 28 go_template_instance( 29 name = "bits64", 30 out = "bits64.go", 31 package = "bits", 32 suffix = "64", 33 template = ":bits_template", 34 types = { 35 "T": "uint64", 36 }, 37 ) 38 39 go_template_instance( 40 name = "bits32", 41 out = "bits32.go", 42 package = "bits", 43 suffix = "32", 44 template = ":bits_template", 45 types = { 46 "T": "uint32", 47 }, 48 ) 49 50 go_test( 51 name = "bits_test", 52 size = "small", 53 srcs = ["uint64_test.go"], 54 library = ":bits", 55 )