1// 2// Copyright (C) 2018 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 // http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // the below license kinds from "system_bpf_license": 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["system_bpf_license"], 23} 24 25cc_library { 26 name: "libbpf_android", 27 vendor_available: false, 28 host_supported: false, 29 target: { 30 android: { 31 srcs: [ 32 "Loader.cpp", 33 ], 34 sanitize: { 35 misc_undefined: ["integer"], 36 }, 37 }, 38 }, 39 40 shared_libs: [ 41 "libbase", 42 "libcutils", 43 "libutils", 44 "liblog", 45 "libbpf_bcc", 46 "libbpf_minimal", 47 ], 48 header_libs: [ 49 "bpf_headers", 50 ], 51 export_header_lib_headers: [ 52 "bpf_headers", 53 ], 54 export_shared_lib_headers: ["libbpf_bcc"], 55 export_include_dirs: ["include"], 56 57 defaults: ["bpf_defaults"], 58 cflags: [ 59 "-Werror", 60 "-Wall", 61 "-Wextra", 62 ], 63} 64 65cc_test { 66 name: "libbpf_load_test", 67 test_suites: ["general-tests"], 68 header_libs: ["bpf_headers"], 69 srcs: [ 70 "BpfLoadTest.cpp", 71 ], 72 defaults: ["bpf_defaults"], 73 cflags: [ 74 "-Wall", 75 "-Werror", 76 "-Wno-error=unused-variable", 77 ], 78 static_libs: ["libgmock"], 79 shared_libs: [ 80 "libbpf_android", 81 "libbpf_bcc", 82 "libbpf_minimal", 83 "libbase", 84 "liblog", 85 "libutils", 86 ], 87 88 data: [ 89 ":bpfLoadTpProg.o", 90 ":bpfLoadTpProgBtf.o", 91 ], 92 require_root: true, 93} 94