Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 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 | |
| 17 | // |
| 18 | // bpfLoad binary |
| 19 | // |
Bob Badour | dcbf8ca | 2021-02-03 22:55:55 -0800 | [diff] [blame] | 20 | package { |
| 21 | // http://go/android-license-faq |
| 22 | // A large-scale-change added 'default_applicable_licenses' to import |
| 23 | // the below license kinds from "system_bpf_license": |
| 24 | // SPDX-license-identifier-Apache-2.0 |
| 25 | default_applicable_licenses: ["system_bpf_license"], |
| 26 | } |
| 27 | |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 28 | cc_binary { |
| 29 | name: "bpfloader", |
| 30 | |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 31 | defaults: ["bpf_defaults"], |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Werror", |
| 35 | "-Wthread-safety", |
| 36 | ], |
| 37 | sanitize: { |
| 38 | integer_overflow: true, |
| 39 | }, |
Alix | 8849bb1 | 2022-04-18 03:57:58 +0000 | [diff] [blame] | 40 | |
Ken Chen | fb04562 | 2021-12-21 15:36:25 +0800 | [diff] [blame] | 41 | header_libs: ["bpf_headers"], |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 42 | shared_libs: [ |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 43 | "libbase", |
Maciej Żenczykowski | 0d1d07c | 2023-10-08 23:21:46 -0700 | [diff] [blame] | 44 | "libbpf_android", |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 45 | "liblog", |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 46 | ], |
| 47 | srcs: [ |
| 48 | "BpfLoader.cpp", |
| 49 | ], |
| 50 | |
Joel Fernandes | 6e1341e | 2018-11-29 11:36:13 -0800 | [diff] [blame] | 51 | init_rc: ["bpfloader.rc"], |
| 52 | |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 53 | required: [ |
Ken Chen | 498d20b | 2022-07-10 19:10:36 +0800 | [diff] [blame] | 54 | "timeInState.o" |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 55 | ], |
| 56 | |
Ryan Zuklie | 6574820 | 2022-12-07 18:22:21 -0800 | [diff] [blame] | 57 | product_variables: { |
| 58 | debuggable: { |
| 59 | required: [ |
| 60 | "bpfRingbufProg.o", |
| 61 | ], |
| 62 | }, |
| 63 | } |
Chenbo Feng | 75b410b | 2018-10-10 15:01:19 -0700 | [diff] [blame] | 64 | } |