aboutsummaryrefslogtreecommitdiff
path: root/tests/legacy/build_constraints/BUILD.bazel
blob: bacd8e6672967bfa739e731e5a4706048d258521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_test(
    name = "go_default_test",
    size = "small",
    srcs = ["build_constraints_test.go"],
    embed = [":go_default_library"],
)

go_library(
    name = "go_default_library",
    srcs = [
        # Check suffixes are filtered.
        "suffix_linux.go",
        "suffix_unknown.go",
        # Check that tags are observed.
        "tag_l.go",
        "tag_unknown.go",
        # Check that constraints apply to assembly files.
        "asm_arm64.s",
        "asm_linux_amd64.s",
        "asm_unknown.s",
        # Check that constraints apply to cgo files.
        "cgo_linux.go",
        "cgo_unknown.go",
        "cgo_linux.c",
        "cgo_unknown.c",
        ":c_srcs_group",
    ],
    cgo = True,
    importpath = "github.com/bazelbuild/rules_go/tests/build_constraints",
)

filegroup(
    name = "c_srcs_group",
    srcs = [
        "cgo_group_linux.c",
        "cgo_group_unknown.c",
    ],
)