Handle new filetype 'linker_config'
Handle new filetype 'linker_config' which is configuration for
linkerconfig in json type and convert into protobuf in build time.
Bug: 169634881
Test: Build succeeded and cuttlefish boot succeeded
Change-Id: I56555fc738e6d6600d15a191a24f79a2ee747f52
diff --git a/linkerconfig/proto/Android.bp b/linkerconfig/proto/Android.bp
new file mode 100644
index 0000000..c04887e
--- /dev/null
+++ b/linkerconfig/proto/Android.bp
@@ -0,0 +1,28 @@
+cc_library_static {
+ name: "lib_linker_config_proto_lite",
+ host_supported: true,
+ recovery_available: true,
+ proto: {
+ export_proto_headers: true,
+ type: "lite",
+ },
+ srcs: ["linker_config.proto"],
+}
+
+python_library_host {
+ name: "linker_config_proto",
+ version: {
+ py2: {
+ enabled: false,
+ },
+ py3: {
+ enabled: true,
+ },
+ },
+ srcs: [
+ "linker_config.proto",
+ ],
+ proto: {
+ canonical_path_from_root: false,
+ },
+}
diff --git a/linkerconfig/proto/OWNERS b/linkerconfig/proto/OWNERS
new file mode 100644
index 0000000..31f0460
--- /dev/null
+++ b/linkerconfig/proto/OWNERS
@@ -0,0 +1,3 @@
+kiyoungkim@google.com
+jiyong@google.com
+jooyung@google.com
diff --git a/linkerconfig/proto/linker_config.proto b/linkerconfig/proto/linker_config.proto
new file mode 100644
index 0000000..91a5968
--- /dev/null
+++ b/linkerconfig/proto/linker_config.proto
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 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.
+ */
+
+// This format file defines configuration file for linkerconfig. Details on this
+// format can be found from
+// https://android.googlesource.com/platform/system/linkerconfig/+/master/README.md
+
+syntax = "proto3";
+
+package android.linkerconfig.proto;
+
+message LinkerConfig {
+ // Extra permitted paths
+ repeated string permittedPaths = 1;
+
+ // Force APEX namespace visible
+ bool visible = 2;
+}