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 17package { 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 default_team: "trendy_team_art_performance", 26} 27 28cc_library { 29 name: "libsigchain", 30 defaults: ["art_defaults"], 31 visibility: [ 32 "//frameworks/base/cmds/app_process", 33 ], 34 // Make libsigchain symbols global, so that an app library which 35 // is loaded in a classloader linker namespace looks for 36 // libsigchain symbols before libc. 37 // -z,global marks the binary with the DF_1_GLOBAL flag which puts the symbols 38 // in the global group. It does not affect their visibilities like the version 39 // script does. 40 ldflags: ["-Wl,-z,global"], 41 42 host_supported: true, 43 target: { 44 linux: { 45 srcs: ["sigchain.cc"], 46 }, 47 48 darwin: { 49 srcs: ["sigchain_fake.cc"], 50 }, 51 52 android: { 53 header_libs: ["bionic_libc_platform_headers"], 54 static_libs: ["libasync_safe"], 55 shared_libs: ["libunwindstack"], 56 }, 57 58 linux_bionic: { 59 header_libs: ["bionic_libc_platform_headers"], 60 }, 61 }, 62 63 export_include_dirs: ["."], 64 apex_available: [ 65 "com.android.art", 66 "com.android.art.debug", 67 "test_broken_com.android.art", 68 ], 69 stubs: { 70 symbol_file: "libsigchain.map.txt", 71 versions: ["1"], 72 }, 73} 74 75// Create a fake version of libsigchain which expose the necessary symbols 76// but throws when called. This can be used to get static binaries which don't 77// need the real functionality of the sig chain but need to please the linker. 78cc_library_static { 79 name: "libsigchain_fake", 80 host_supported: true, 81 defaults: ["art_defaults"], 82 srcs: ["sigchain_fake.cc"], 83 target: { 84 android: { 85 static_libs: ["libasync_safe"], 86 }, 87 }, 88 89 export_include_dirs: ["."], 90} 91 92art_cc_defaults { 93 name: "art_sigchain_tests_defaults", 94 srcs: ["sigchain_test.cc"], 95} 96 97// Version of ART gtest `art_sigchain_tests` bundled with the ART APEX on target. 98// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. 99art_cc_test { 100 name: "art_sigchain_tests", 101 defaults: [ 102 "art_gtest_defaults", 103 "art_sigchain_tests_defaults", 104 ], 105} 106 107// Standalone version of ART gtest `art_sigchain_tests`, not bundled with the ART APEX on target. 108art_cc_test { 109 name: "art_standalone_sigchain_tests", 110 defaults: [ 111 "art_standalone_gtest_defaults", 112 "art_sigchain_tests_defaults", 113 ], 114} 115