github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/sync/seqatomic/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_seqatomic",
     8      srcs = ["generic_seqatomic_unsafe.go"],
     9      types = [
    10          "Value",
    11      ],
    12      visibility = ["//:sandbox"],
    13      deps = [
    14          ":sync",
    15          "//pkg/gohacks",
    16      ],
    17  )
    18  
    19  go_template_instance(
    20      name = "seqatomic_int",
    21      out = "seqatomic_int_unsafe.go",
    22      package = "seqatomic",
    23      suffix = "Int",
    24      template = ":generic_seqatomic",
    25      types = {
    26          "Value": "int",
    27      },
    28  )
    29  
    30  go_library(
    31      name = "seqatomic",
    32      srcs = ["seqatomic_int_unsafe.go"],
    33      deps = [
    34          "//pkg/gohacks",
    35          "//pkg/sync",
    36      ],
    37  )
    38  
    39  go_test(
    40      name = "seqatomic_test",
    41      size = "small",
    42      srcs = ["seqatomic_test.go"],
    43      library = ":seqatomic",
    44      deps = ["//pkg/sync"],
    45  )