blob: 595390ad80ca96acb8b7589765460a102399a0d1 [file] [log] [blame]
Joel Fernandesc5c05162018-10-16 13:26:56 -07001//
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 Badourb14ee3e2021-02-12 14:22:03 -080017package {
18 default_applicable_licenses: ["system_bpfprogs_license"],
19}
20
Bob Badourb14ee3e2021-02-12 14:22:03 -080021license {
22 name: "system_bpfprogs_license",
Bob Badourb14ee3e2021-02-12 14:22:03 -080023 license_kinds: [
Bob Badourb14ee3e2021-02-12 14:22:03 -080024 "SPDX-license-identifier-GPL-2.0",
25 ],
Bob Badourca8ade92021-06-18 13:20:51 -070026 license_text: ["LICENSE"],
Bob Badourb14ee3e2021-02-12 14:22:03 -080027}
28
Joel Fernandesc5c05162018-10-16 13:26:56 -070029bpf {
30 name: "time_in_state.o",
31 srcs: ["time_in_state.c"],
Connor O'Brien22cc4342022-01-27 17:47:46 -080032 btf: true,
Joel Fernandesc5c05162018-10-16 13:26:56 -070033 cflags: [
34 "-Wall",
35 "-Werror",
36 ],
Ken Chenbcd38b42021-12-23 10:28:31 +080037 include_dirs: [
38 "system/bpf/progs/include",
39 ],
Joel Fernandesc5c05162018-10-16 13:26:56 -070040}
Dmitri Plotnikov266d5a22020-10-20 11:11:15 -070041
42cc_library {
43 name: "lib_mock_bpf_time_in_state",
44 srcs: ["time_in_state.c"],
45 header_libs: ["bpf_prog_headers"],
46 cflags: [
47 "-Wall",
48 "-Werror",
49 "-DMOCK_BPF",
50 ],
51 static_libs: [
52 "lib_mock_bpf",
53 ],
54}
55
56cc_test {
57 name: "bpf-time-in-state-tests",
Connor O'Brienf78a0a32022-03-04 13:14:47 -080058 test_suites: ["general-tests"],
Dmitri Plotnikov266d5a22020-10-20 11:11:15 -070059 gtest: true,
60 host_supported: false,
61 srcs: [
62 "time_in_state_test.cpp",
63 ],
64 header_libs: ["bpf_prog_headers"],
65 cflags: [
66 "-Wall",
67 "-Werror",
68 ],
69 whole_static_libs: [
70 "lib_mock_bpf_time_in_state",
71 ],
72 static_libs: [
73 "libgtest_isolated",
74 "lib_mock_bpf",
75 ],
76 static_executable: true,
77 stl: "libc++_static",
78 licenses: ["Android-Apache-2.0"],
79}
Paul Lawrence5bb6bb92021-11-09 16:33:29 +000080
81bpf {
82 name: "fuse_media.o",
83 srcs: ["fuse_media.c"],
84 cflags: [
85 "-Wall",
86 "-Werror",
87 ],
88 include_dirs: [
89 "external/libfuse/include",
90 ],
91}