github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/sync/atomicptr/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_template(
     7      name = "generic_atomicptr",
     8      srcs = ["generic_atomicptr_unsafe.go"],
     9      types = [
    10          "Value",
    11      ],
    12      visibility = ["//:sandbox"],
    13  )
    14  
    15  go_template_instance(
    16      name = "atomicptr_int",
    17      out = "atomicptr_int_unsafe.go",
    18      package = "atomicptr",
    19      suffix = "Int",
    20      template = ":generic_atomicptr",
    21      types = {
    22          "Value": "int",
    23      },
    24  )
    25  
    26  go_library(
    27      name = "atomicptr",
    28      srcs = ["atomicptr_int_unsafe.go"],
    29  )
    30  
    31  go_test(
    32      name = "atomicptr_test",
    33      size = "small",
    34      srcs = ["atomicptr_test.go"],
    35      library = ":atomicptr",
    36  )