libprocessgroup: Add libcgrouprc
This module is an LL-NDK library that can be loaded by
modules that link to libprocessgroup (which is in VNDK).
This module defines APIs that reads cgroups.rc file
programatically. Internally, it uses libcgrouprc_format to
do so.
Test: builds
Bug: 123664216
Change-Id: I9c13c0528461758154e23cbab3a94ade7fb351ee
Merged-In: I9c13c0528461758154e23cbab3a94ade7fb351ee
diff --git a/libprocessgroup/cgrouprc/Android.bp b/libprocessgroup/cgrouprc/Android.bp
new file mode 100644
index 0000000..f5ff7eb
--- /dev/null
+++ b/libprocessgroup/cgrouprc/Android.bp
@@ -0,0 +1,52 @@
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_library_shared {
+ name: "libcgrouprc",
+ host_supported: true,
+ recovery_available: true,
+ srcs: [
+ "cgroup_controller.cpp",
+ "cgroup_file.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ export_include_dirs: [
+ "include",
+ ],
+ header_libs: [
+ "libprocessgroup_headers",
+ ],
+ shared_libs: [
+ "libbase",
+ ],
+ static_libs: [
+ "libcgrouprc_format",
+ ],
+ stubs: {
+ symbol_file: "libcgrouprc.map.txt",
+ versions: ["29"],
+ },
+ version_script: "libcgrouprc.map.txt",
+}
+
+llndk_library {
+ name: "libcgrouprc",
+ symbol_file: "libcgrouprc.map.txt",
+ export_include_dirs: [
+ "include",
+ ],
+}