1/*
2 * Copyright 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17cc_library {
18    name: "libprotobuf-mutator",
19    host_supported: true,
20    vendor_available: true,
21    srcs: [
22        "src/binary_format.cc",
23        "src/libfuzzer/libfuzzer_macro.cc",
24        "src/libfuzzer/libfuzzer_mutator.cc",
25        "src/mutator.cc",
26        "src/text_format.cc",
27        "src/utf8_fix.cc",
28    ],
29    shared_libs: ["libprotobuf-cpp-full"],
30    export_include_dirs: ["."],
31    cflags: [
32        "-Wno-unused-parameter",
33    ],
34
35    // We explicitly disable sanitization on LPM for performance reasons. We
36    // aren't interested in the coverage feedback in LPM itself, only the
37    // libraries that are being exercised. Disabling all sanitizers also
38    // increases performance, as we aren't looking for bugs in the mutator
39    // (which is particularly hot code in LPM binaries).
40    sanitize: {
41        never: true,
42    },
43}
44