blob: 0e25f62d9be6de91b353a85153a310c5317b2952 [file] [log] [blame]
Colin Cross1f7f3bd2016-07-27 10:12:38 -07001//
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",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +010019 defaults: ["art_defaults"],
20 visibility: [
Martin Stjernholm2842ac12020-04-16 23:49:39 +010021 // TODO(b/142944043, b/133140750): Clean this up.
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +010022 "//frameworks/base/cmds/app_process",
23 ],
Josh Gaod32d79d2018-02-26 14:29:25 -080024
Colin Cross1f7f3bd2016-07-27 10:12:38 -070025 host_supported: true,
Colin Cross1f7f3bd2016-07-27 10:12:38 -070026 target: {
Josh Gaod32d79d2018-02-26 14:29:25 -080027 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
Colin Cross1f7f3bd2016-07-27 10:12:38 -070040 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070041 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070042 },
43 },
Colin Cross616f4002019-05-29 21:39:14 -070044
45 export_include_dirs: ["."],
Jiyong Park066dd9022019-12-19 02:11:59 +000046 apex_available: [
47 "com.android.art.release",
48 "com.android.art.debug",
Martin Stjernholm2842ac12020-04-16 23:49:39 +010049 // TODO(b/142944043) Clean this up. This is due to the dependency from
Jiyong Park066dd9022019-12-19 02:11:59 +000050 // app_process
51 "//apex_available:platform",
52 ],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070053}
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: {
Colin Cross1f7f3bd2016-07-27 10:12:38 -070064 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070065 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070066 },
67 },
Colin Cross616f4002019-05-29 21:39:14 -070068
69 export_include_dirs: ["."],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070070}
Josh Gao1eac77e2018-02-26 15:54:41 -080071
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}