Joel Fernandes | c5c0516 | 2018-10-16 13:26:56 -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 | |
Bob Badour | b14ee3e | 2021-02-12 14:22:03 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["system_bpfprogs_license"], |
| 19 | } |
| 20 | |
Bob Badour | b14ee3e | 2021-02-12 14:22:03 -0800 | [diff] [blame] | 21 | license { |
| 22 | name: "system_bpfprogs_license", |
Bob Badour | b14ee3e | 2021-02-12 14:22:03 -0800 | [diff] [blame] | 23 | license_kinds: [ |
Bob Badour | b14ee3e | 2021-02-12 14:22:03 -0800 | [diff] [blame] | 24 | "SPDX-license-identifier-GPL-2.0", |
| 25 | ], |
Bob Badour | ca8ade9 | 2021-06-18 13:20:51 -0700 | [diff] [blame] | 26 | license_text: ["LICENSE"], |
Bob Badour | b14ee3e | 2021-02-12 14:22:03 -0800 | [diff] [blame] | 27 | } |
| 28 | |
Joel Fernandes | c5c0516 | 2018-10-16 13:26:56 -0700 | [diff] [blame] | 29 | bpf { |
| 30 | name: "time_in_state.o", |
| 31 | srcs: ["time_in_state.c"], |
| 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Werror", |
| 35 | ], |
Joel Fernandes | c5c0516 | 2018-10-16 13:26:56 -0700 | [diff] [blame] | 36 | } |
Dmitri Plotnikov | 266d5a2 | 2020-10-20 11:11:15 -0700 | [diff] [blame] | 37 | |
| 38 | cc_library { |
| 39 | name: "lib_mock_bpf_time_in_state", |
| 40 | srcs: ["time_in_state.c"], |
| 41 | header_libs: ["bpf_prog_headers"], |
| 42 | cflags: [ |
| 43 | "-Wall", |
| 44 | "-Werror", |
| 45 | "-DMOCK_BPF", |
| 46 | ], |
| 47 | static_libs: [ |
| 48 | "lib_mock_bpf", |
| 49 | ], |
| 50 | } |
| 51 | |
| 52 | cc_test { |
| 53 | name: "bpf-time-in-state-tests", |
| 54 | gtest: true, |
| 55 | host_supported: false, |
| 56 | srcs: [ |
| 57 | "time_in_state_test.cpp", |
| 58 | ], |
| 59 | header_libs: ["bpf_prog_headers"], |
| 60 | cflags: [ |
| 61 | "-Wall", |
| 62 | "-Werror", |
| 63 | ], |
| 64 | whole_static_libs: [ |
| 65 | "lib_mock_bpf_time_in_state", |
| 66 | ], |
| 67 | static_libs: [ |
| 68 | "libgtest_isolated", |
| 69 | "lib_mock_bpf", |
| 70 | ], |
| 71 | static_executable: true, |
| 72 | stl: "libc++_static", |
| 73 | licenses: ["Android-Apache-2.0"], |
| 74 | } |
Paul Lawrence | 5bb6bb9 | 2021-11-09 16:33:29 +0000 | [diff] [blame] | 75 | |
| 76 | bpf { |
| 77 | name: "fuse_media.o", |
| 78 | srcs: ["fuse_media.c"], |
| 79 | cflags: [ |
| 80 | "-Wall", |
| 81 | "-Werror", |
| 82 | ], |
| 83 | include_dirs: [ |
| 84 | "external/libfuse/include", |
| 85 | ], |
| 86 | } |