aboutsummaryrefslogtreecommitdiff
path: root/BUILD.bazel
blob: 9084574663e95c0b7f2b64ecb14740a7d54dfeeb (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("//bazel:compat.bzl", "SKIP_ON_WINDOWS")

exports_files(["LICENSE"])

pkg_tar(
    name = "jazzer_release",
    srcs = [
        "//launcher:jazzer",
        "//src/main/java/com/code_intelligence/jazzer:jazzer_standalone_deploy.jar",
    ],
    extension = "tar.gz",
    mode = "0777",
    remap_paths = {
        "src/main/java/com/code_intelligence/jazzer/jazzer_standalone_deploy.jar": "jazzer_standalone.jar",
    } | select({
        "@platforms//os:windows": {"launcher/jazzer": "jazzer.exe"},
        "//conditions:default": {"launcher/jazzer": "jazzer"},
    }),
    strip_prefix = select({
        "@platforms//os:windows": ".\\",
        "//conditions:default": "./",
    }),
    visibility = ["//tests:__pkg__"],
)

alias(
    name = "jazzer",
    actual = "//launcher:jazzer",
)

alias(
    name = "addlicense",
    actual = select({
        "@platforms//os:macos": "@addlicense-darwin-universal//file:addlicense",
        "@platforms//os:linux": "@addlicense-linux-amd64//file:addlicense",
    }),
    tags = ["manual"],
)

BUILDIFIER_EXCLUDE_PATTERNS = [
    "./.git/*",
    "./.ijwb/*",
    "./.clwb/*",
]

buildifier(
    name = "buildifier",
    diff_command = "diff -u",
    exclude_patterns = BUILDIFIER_EXCLUDE_PATTERNS,
    mode = "fix",
    tags = ["manual"],
)

buildifier_test(
    name = "buildifier_test",
    diff_command = "diff -u",
    exclude_patterns = BUILDIFIER_EXCLUDE_PATTERNS,
    no_sandbox = True,
    target_compatible_with = SKIP_ON_WINDOWS,
    workspace = "//:WORKSPACE.bazel",
)

alias(
    name = "clang-format",
    actual = select({
        "@platforms//os:macos": "@clang-format-15-darwin-x64//file:clang-format",
        "@platforms//os:linux": "@clang-format-15-linux-x64//file:clang-format",
    }),
    tags = ["manual"],
)

platform(
    name = "android_arm64",
    constraint_values = [
        "@platforms//cpu:arm64",
        "@platforms//os:android",
    ],
    visibility = ["//:__subpackages__"],
)