blob: a151d7a6bca24d7e851de1399b8def949c338566 [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",
Josh Gaod32d79d2018-02-26 14:29:25 -080019 cpp_std: "gnu++17",
20
Colin Cross1f7f3bd2016-07-27 10:12:38 -070021 host_supported: true,
22 defaults: ["art_defaults"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070023 target: {
Josh Gaod32d79d2018-02-26 14:29:25 -080024 linux: {
25 shared: {
26 srcs: ["sigchain_dummy.cc"],
27 },
28 static: {
29 srcs: ["sigchain.cc"],
30 },
31 },
32
33 darwin: {
34 srcs: ["sigchain_dummy.cc"],
35 },
36
Colin Cross1f7f3bd2016-07-27 10:12:38 -070037 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070038 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070039 },
40 },
Andreas Gampe89b85842017-05-10 09:47:55 -070041 // Sigchainlib is whole-statically linked into binaries. For Android.mk-based binaries,
42 // this will drag ASAN symbols into the binary, even for modules using LOCAL_SANITIZE := never.
43 // So disable sanitization for now. b/38456126
44 sanitize: {
45 never: true,
46 },
Colin Cross1f7f3bd2016-07-27 10:12:38 -070047}
48
49// Create a dummy version of libsigchain which expose the necessary symbols
50// but throws when called. This can be used to get static binaries which don't
51// need the real functionality of the sig chain but need to please the linker.
52cc_library_static {
53 name: "libsigchain_dummy",
54 host_supported: true,
55 defaults: ["art_defaults"],
56 srcs: ["sigchain_dummy.cc"],
57 target: {
Colin Cross1f7f3bd2016-07-27 10:12:38 -070058 android: {
Josh Gaocca6fc02018-03-12 16:37:21 -070059 whole_static_libs: ["libasync_safe"],
Colin Cross1f7f3bd2016-07-27 10:12:38 -070060 },
61 },
62}
Josh Gao1eac77e2018-02-26 15:54:41 -080063
64art_cc_test {
65 name: "art_sigchain_tests",
66 defaults: [
67 "art_gtest_defaults",
68 ],
69 srcs: ["sigchain_test.cc"],
70 whole_static_libs: ["libsigchain"],
71}