xref: /aosp_15_r20/external/llvm/lib/Fuzzer/Android.bp (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1//
2// Copyright (C) 2015 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    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "external_llvm_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-NCSA
23    //   legacy_unencumbered
24    default_applicable_licenses: ["external_llvm_license"],
25}
26
27cc_library_static {
28    name: "libLLVMFuzzerNoMain",
29    host_supported: true,
30    include_dirs: ["external/compiler-rt/include"],
31    cflags: [
32        "-W",
33        "-Wall",
34        "-Werror",
35        "-Wno-unused-lambda-capture",
36        "-Wno-unused-parameter",
37    ],
38    cpp_std: "gnu++11",
39    srcs: ["*.cpp"],
40    exclude_srcs: ["FuzzerMain.cpp"],
41    sanitize: {
42        address: false,
43        fuzzer: false,
44    },
45}
46
47cc_library_static {
48    name: "libLLVMFuzzer",
49    host_supported: true,
50    cflags: [
51        "-W",
52        "-Wall",
53        "-Werror",
54        "-Wno-unused-lambda-capture",
55        "-Wno-unused-parameter",
56    ],
57    cpp_std: "gnu++11",
58    srcs: ["FuzzerMain.cpp"],
59    whole_static_libs: ["libLLVMFuzzerNoMain"],
60    sanitize: {
61        address: false,
62        fuzzer: false,
63    },
64}
65