1//
2// Copyright (C) 2014 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
17cc_library {
18    name: "libsigchain",
19    defaults: ["art_defaults"],
20    visibility: [
21        // TODO(b/133140750): Clean this up.
22        "//frameworks/base/cmds/app_process",
23    ],
24
25    host_supported: true,
26    target: {
27        linux: {
28            shared: {
29                srcs: ["sigchain_dummy.cc"],
30            },
31            static: {
32                srcs: ["sigchain.cc"],
33            },
34        },
35
36        darwin: {
37            srcs: ["sigchain_dummy.cc"],
38        },
39
40        android: {
41            whole_static_libs: ["libasync_safe"],
42        },
43    },
44
45    export_include_dirs: ["."],
46    apex_available: [
47        "com.android.art.release",
48        "com.android.art.debug",
49        // TODO(b/142944931) Clean this up. This is due to the dependency from
50        // app_process
51        "//apex_available:platform",
52    ],
53}
54
55// Create a dummy version of libsigchain which expose the necessary symbols
56// but throws when called. This can be used to get static binaries which don't
57// need the real functionality of the sig chain but need to please the linker.
58cc_library_static {
59    name: "libsigchain_dummy",
60    host_supported: true,
61    defaults: ["art_defaults"],
62    srcs: ["sigchain_dummy.cc"],
63    target: {
64        android: {
65            whole_static_libs: ["libasync_safe"],
66        },
67    },
68
69    export_include_dirs: ["."],
70}
71
72art_cc_test {
73    name: "art_sigchain_tests",
74    defaults: [
75        "art_gtest_defaults",
76    ],
77    srcs: ["sigchain_test.cc"],
78    whole_static_libs: ["libsigchain"],
79}
80
81filegroup {
82    name: "art_sigchain_version_script32.txt",
83    visibility: [
84        // TODO(b/133140750): Clean this up.
85        "//frameworks/base/cmds/app_process",
86    ],
87    srcs: ["version-script32.txt"],
88}
89
90filegroup {
91    name: "art_sigchain_version_script64.txt",
92    visibility: [
93        // TODO(b/133140750): Clean this up.
94        "//frameworks/base/cmds/app_process",
95    ],
96    srcs: ["version-script64.txt"],
97}
98