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 | |
| 17 | cc_library { |
| 18 | name: "libsigchain", |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 19 | defaults: ["art_defaults"], |
| 20 | visibility: [ |
Martin Stjernholm | 2842ac1 | 2020-04-16 23:49:39 +0100 | [diff] [blame] | 21 | // TODO(b/142944043, b/133140750): Clean this up. |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 22 | "//frameworks/base/cmds/app_process", |
| 23 | ], |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 24 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 25 | host_supported: true, |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 26 | target: { |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 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 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 40 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 41 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 42 | }, |
| 43 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 44 | |
| 45 | export_include_dirs: ["."], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 46 | apex_available: [ |
| 47 | "com.android.art.release", |
| 48 | "com.android.art.debug", |
Martin Stjernholm | 2842ac1 | 2020-04-16 23:49:39 +0100 | [diff] [blame] | 49 | // 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] | 50 | // app_process |
| 51 | "//apex_available:platform", |
| 52 | ], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 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. |
| 58 | cc_library_static { |
| 59 | name: "libsigchain_dummy", |
| 60 | host_supported: true, |
| 61 | defaults: ["art_defaults"], |
| 62 | srcs: ["sigchain_dummy.cc"], |
| 63 | target: { |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 64 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 65 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 66 | }, |
| 67 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 68 | |
| 69 | export_include_dirs: ["."], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 70 | } |
Josh Gao | 1eac77e | 2018-02-26 15:54:41 -0800 | [diff] [blame] | 71 | |
| 72 | art_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 | } |