Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 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 | |
Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 17 | package { |
| 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 Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 27 | cc_library { |
| 28 | name: "libsigchain", |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 29 | defaults: ["art_defaults"], |
| 30 | visibility: [ |
Martin Stjernholm | 2842ac1 | 2020-04-16 23:49:39 +0100 | [diff] [blame] | 31 | // TODO(b/142944043, b/133140750): Clean this up. |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 32 | "//frameworks/base/cmds/app_process", |
| 33 | ], |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 34 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 35 | host_supported: true, |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 36 | target: { |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 37 | linux: { |
| 38 | shared: { |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 39 | srcs: ["sigchain_fake.cc"], |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 40 | }, |
| 41 | static: { |
| 42 | srcs: ["sigchain.cc"], |
| 43 | }, |
| 44 | }, |
| 45 | |
| 46 | darwin: { |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 47 | srcs: ["sigchain_fake.cc"], |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 48 | }, |
| 49 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 50 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 51 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 52 | }, |
| 53 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 54 | |
| 55 | export_include_dirs: ["."], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 56 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 57 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 58 | "com.android.art.debug", |
Martin Stjernholm | 2842ac1 | 2020-04-16 23:49:39 +0100 | [diff] [blame] | 59 | // TODO(b/142944043) Clean this up. This is due to the dependency from |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 60 | // app_process |
| 61 | "//apex_available:platform", |
| 62 | ], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 63 | } |
| 64 | |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 65 | // Create a fake version of libsigchain which expose the necessary symbols |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 66 | // 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. |
| 68 | cc_library_static { |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 69 | name: "libsigchain_fake", |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 70 | host_supported: true, |
| 71 | defaults: ["art_defaults"], |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 72 | srcs: ["sigchain_fake.cc"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 73 | target: { |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 74 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 75 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 76 | }, |
| 77 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 78 | |
| 79 | export_include_dirs: ["."], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 80 | } |
Josh Gao | 1eac77e | 2018-02-26 15:54:41 -0800 | [diff] [blame] | 81 | |
| 82 | art_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 | } |