github.com/0xKiwi/rules_go@v0.24.3/tests/legacy/build_constraints/BUILD.bazel (about)

     1  load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
     2  
     3  go_test(
     4      name = "go_default_test",
     5      size = "small",
     6      srcs = ["build_constraints_test.go"],
     7      embed = [":go_default_library"],
     8  )
     9  
    10  go_library(
    11      name = "go_default_library",
    12      srcs = [
    13          # Check suffixes are filtered.
    14          "suffix_linux.go",
    15          "suffix_unknown.go",
    16          # Check that tags are observed.
    17          "tag_l.go",
    18          "tag_unknown.go",
    19          # Check that constraints apply to assembly files.
    20          "asm_linux.s",
    21          "asm_unknown.s",
    22          # Check that constraints apply to cgo files.
    23          "cgo_linux.go",
    24          "cgo_unknown.go",
    25          "cgo_linux.c",
    26          "cgo_unknown.c",
    27          ":c_srcs_group",
    28      ],
    29      cgo = True,
    30      importpath = "github.com/bazelbuild/rules_go/tests/build_constraints",
    31  )
    32  
    33  filegroup(
    34      name = "c_srcs_group",
    35      srcs = [
    36          "cgo_group_linux.c",
    37          "cgo_group_unknown.c",
    38      ],
    39  )