blob: 5783e9a53e358e8667561912cca764bde6a73968 [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
Bob Badour9150de62021-02-26 03:22:24 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "art_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 // SPDX-license-identifier-BSD
24 default_applicable_licenses: ["art_license"],
25}
26
Colin Cross1f7f3bd2016-07-27 10:12:38 -070027cc_library {
28 name: "libsigchain",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +010029 defaults: ["art_defaults"],
30 visibility: [
Martin Stjernholm2842ac12020-04-16 23:49:39 +010031 // TODO(b/142944043, b/133140750): Clean this up.
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +010032 "//frameworks/base/cmds/app_process",
33 ],
Josh Gaod32d79d2018-02-26 14:29:25 -080034
Colin Cross1f7f3bd2016-07-27 10:12:38 -070035 host_supported: true,
Colin Cross1f7f3bd2016-07-27 10:12:38 -070036 target: {
Josh Gaod32d79d2018-02-26 14:29:25 -080037 linux: {
38 shared: {
David Srbeckyd3ee9022020-07-27 16:05:38 +010039 srcs: ["sigchain_fake.cc"],
Josh Gaod32d79d2018-02-26 14:29:25 -080040 },
41 static: {
42 srcs: ["sigchain.cc"],
43 },
44 },
45
46 darwin: {
David Srbeckyd3ee9022020-07-27 16:05:38 +010047 srcs: ["sigchain_fake.cc"],
Josh Gaod32d79d2018-02-26 14:29:25 -080048 },
49
Colin Cross1f7f3bd2016-07-27 10:12:38 -070050 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070051 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070052 },
53 },
Colin Cross616f4002019-05-29 21:39:14 -070054
55 export_include_dirs: ["."],
Jiyong Park066dd9022019-12-19 02:11:59 +000056 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010057 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000058 "com.android.art.debug",
Martin Stjernholm2842ac12020-04-16 23:49:39 +010059 // TODO(b/142944043) Clean this up. This is due to the dependency from
Jiyong Park066dd9022019-12-19 02:11:59 +000060 // app_process
61 "//apex_available:platform",
62 ],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070063}
64
David Srbeckyd3ee9022020-07-27 16:05:38 +010065// Create a fake version of libsigchain which expose the necessary symbols
Colin Cross1f7f3bd2016-07-27 10:12:38 -070066// but throws when called. This can be used to get static binaries which don't
67// need the real functionality of the sig chain but need to please the linker.
68cc_library_static {
David Srbeckyd3ee9022020-07-27 16:05:38 +010069 name: "libsigchain_fake",
Colin Cross1f7f3bd2016-07-27 10:12:38 -070070 host_supported: true,
71 defaults: ["art_defaults"],
David Srbeckyd3ee9022020-07-27 16:05:38 +010072 srcs: ["sigchain_fake.cc"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070073 target: {
Colin Cross1f7f3bd2016-07-27 10:12:38 -070074 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070075 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070076 },
77 },
Colin Cross616f4002019-05-29 21:39:14 -070078
79 export_include_dirs: ["."],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070080}
Josh Gao1eac77e2018-02-26 15:54:41 -080081
82art_cc_test {
83 name: "art_sigchain_tests",
84 defaults: [
85 "art_gtest_defaults",
86 ],
87 srcs: ["sigchain_test.cc"],
88 whole_static_libs: ["libsigchain"],
89}