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", |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 19 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 20 | host_supported: true, |
| 21 | defaults: ["art_defaults"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 22 | target: { |
Josh Gao | d32d79d | 2018-02-26 14:29:25 -0800 | [diff] [blame] | 23 | linux: { |
| 24 | shared: { |
| 25 | srcs: ["sigchain_dummy.cc"], |
| 26 | }, |
| 27 | static: { |
| 28 | srcs: ["sigchain.cc"], |
| 29 | }, |
| 30 | }, |
| 31 | |
| 32 | darwin: { |
| 33 | srcs: ["sigchain_dummy.cc"], |
| 34 | }, |
| 35 | |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 36 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 37 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 38 | }, |
| 39 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 40 | |
| 41 | export_include_dirs: ["."], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | // Create a dummy version of libsigchain which expose the necessary symbols |
| 45 | // but throws when called. This can be used to get static binaries which don't |
| 46 | // need the real functionality of the sig chain but need to please the linker. |
| 47 | cc_library_static { |
| 48 | name: "libsigchain_dummy", |
| 49 | host_supported: true, |
| 50 | defaults: ["art_defaults"], |
| 51 | srcs: ["sigchain_dummy.cc"], |
| 52 | target: { |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 53 | android: { |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 54 | whole_static_libs: ["libasync_safe"], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 55 | }, |
| 56 | }, |
Colin Cross | 616f400 | 2019-05-29 21:39:14 -0700 | [diff] [blame] | 57 | |
| 58 | export_include_dirs: ["."], |
Colin Cross | 1f7f3bd | 2016-07-27 10:12:38 -0700 | [diff] [blame] | 59 | } |
Josh Gao | 1eac77e | 2018-02-26 15:54:41 -0800 | [diff] [blame] | 60 | |
| 61 | art_cc_test { |
| 62 | name: "art_sigchain_tests", |
| 63 | defaults: [ |
| 64 | "art_gtest_defaults", |
| 65 | ], |
| 66 | srcs: ["sigchain_test.cc"], |
| 67 | whole_static_libs: ["libsigchain"], |
| 68 | } |
Colin Cross | 9298875 | 2019-03-28 22:40:40 -0700 | [diff] [blame] | 69 | |
| 70 | filegroup { |
| 71 | name: "art_sigchain_version_script32.txt", |
| 72 | srcs: ["version-script32.txt"], |
| 73 | } |
| 74 | |
| 75 | filegroup { |
| 76 | name: "art_sigchain_version_script64.txt", |
| 77 | srcs: ["version-script64.txt"], |
| 78 | } |