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