aboutsummaryrefslogtreecommitdiff
path: root/third_party/libFuzzer.BUILD
blob: e85599360b88d0eecb0aee237e6ae1be973e0391 (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
# Based on https://github.com/llvm/llvm-project/blob/llvmorg-11.1.0/compiler-rt/lib/fuzzer/build.sh
cc_library(
    name = "libFuzzer",
    srcs = glob([
        "*.cpp",
    ]),
    hdrs = glob([
        "*.h",
        "*.def",
    ]),
    copts = select({
        "@platforms//os:windows": [
            "/Ox", # Optimize for speed.
            "/Oy-", # Do not omit frame pointer.
            "/std:c++17",
        ],
        "//conditions:default": [
            "-g",
            "-O2",
            "-fno-omit-frame-pointer",
            "-std=c++11",
        ],
    }),
    alwayslink = True,
    linkstatic = True,
    visibility = ["//visibility:public"],
)