1// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19cc_library {
20    name: "libcgrouprc",
21    host_supported: true,
22    ramdisk_available: true,
23    vendor_ramdisk_available: true,
24    recovery_available: true,
25    // Do not ever mark this as vendor_available; otherwise, vendor modules
26    // that links to the static library will behave unexpectedly. All on-device
27    // modules should use libprocessgroup which links to the LL-NDK library
28    // defined below. The static library is built for tests.
29    vendor_available: false,
30    native_bridge_supported: true,
31    llndk: {
32        symbol_file: "libcgrouprc.map.txt",
33    },
34    srcs: [
35        "cgroup_controller.cpp",
36        "cgroup_file.cpp",
37    ],
38    cflags: [
39        "-Wall",
40        "-Werror",
41    ],
42    export_include_dirs: [
43        "include",
44    ],
45    header_libs: [
46        "libprocessgroup_headers",
47    ],
48    shared_libs: [
49        "libbase",
50    ],
51    static_libs: [
52        "libcgrouprc_format",
53    ],
54    stubs: {
55        symbol_file: "libcgrouprc.map.txt",
56        versions: ["29"],
57    },
58    target: {
59        linux: {
60            version_script: "libcgrouprc.map.txt",
61        },
62    },
63}
64