xref: /aosp_15_r20/external/libprotobuf-mutator/Android.bp (revision fd525a9c096e28cf6f8d8719388df0568a611e7b)
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
17package {
18    default_applicable_licenses: ["external_libprotobuf-mutator_license"],
19}
20
21// Added automatically by a large-scale-change
22// See: http://go/android-license-faq
23license {
24    name: "external_libprotobuf-mutator_license",
25    visibility: [":__subpackages__"],
26    license_kinds: [
27        "SPDX-license-identifier-Apache-2.0",
28    ],
29    license_text: [
30        "LICENSE",
31    ],
32}
33
34cc_library {
35    name: "libprotobuf-mutator",
36    host_supported: true,
37    vendor_available: true,
38    srcs: [
39        "src/binary_format.cc",
40        "src/libfuzzer/libfuzzer_macro.cc",
41        "src/libfuzzer/libfuzzer_mutator.cc",
42        "src/mutator.cc",
43        "src/text_format.cc",
44        "src/utf8_fix.cc",
45    ],
46    shared_libs: ["libprotobuf-cpp-full"],
47    export_include_dirs: ["."],
48    cflags: [
49        "-Wno-unused-parameter",
50    ],
51
52    // We explicitly disable sanitization on LPM for performance reasons. We
53    // aren't interested in the coverage feedback in LPM itself, only the
54    // libraries that are being exercised. Disabling all sanitizers also
55    // increases performance, as we aren't looking for bugs in the mutator
56    // (which is particularly hot code in LPM binaries).
57    sanitize: {
58        never: true,
59    },
60}
61