1// 2// Copyright (C) 2018 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 default_applicable_licenses: ["art_license"], 24} 25 26cc_defaults { 27 name: "libprofile_defaults", 28 defaults: ["art_defaults"], 29 host_supported: true, 30 srcs: [ 31 "profile/profile_boot_info.cc", 32 "profile/profile_compilation_info.cc", 33 ], 34 target: { 35 android: { 36 shared_libs: [ 37 "libartpalette", 38 "libbase", 39 "libz", 40 ], 41 static_libs: [ 42 "libmodules-utils-build", 43 // ZipArchive support, the order matters here to get all symbols. 44 "libziparchive", 45 ], 46 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. 47 }, 48 not_windows: { 49 shared_libs: [ 50 "libartpalette", 51 "libziparchive", 52 "libz", 53 "libbase", 54 ], 55 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. 56 }, 57 windows: { 58 cflags: ["-Wno-thread-safety"], 59 static_libs: [ 60 "libartpalette", 61 "libziparchive", 62 "libz", 63 "libbase", 64 ], 65 export_static_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. 66 }, 67 darwin: { 68 enabled: true, 69 }, 70 }, 71 //generated_sources: ["art_libartbase_operator_srcs"], 72 export_include_dirs: ["."], 73} 74 75cc_defaults { 76 name: "libprofile_static_base_defaults", 77 whole_static_libs: [ 78 "libbase", 79 "libz", 80 "libziparchive", 81 ], 82} 83 84cc_defaults { 85 name: "libprofile_static_defaults", 86 defaults: [ 87 "libprofile_static_base_defaults", 88 "libartbase_static_defaults", 89 "libdexfile_static_defaults", 90 ], 91 whole_static_libs: ["libprofile"], 92} 93 94cc_defaults { 95 name: "libprofiled_static_defaults", 96 defaults: [ 97 "libprofile_static_base_defaults", 98 "libartbased_static_defaults", 99 "libdexfiled_static_defaults", 100 ], 101 whole_static_libs: ["libprofiled"], 102} 103 104art_cc_library { 105 name: "libprofile", 106 defaults: [ 107 "libprofile_defaults", 108 "libart_nativeunwind_defaults", 109 ], 110 target: { 111 android: { 112 shared_libs: [ 113 "libartbase", 114 "libdexfile", 115 ], 116 }, 117 not_windows: { 118 shared_libs: [ 119 "libartbase", 120 "libdexfile", 121 ], 122 }, 123 windows: { 124 enabled: true, 125 shared: { 126 enabled: false, 127 }, 128 static_libs: [ 129 "libartbase", 130 "libdexfile", 131 ], 132 }, 133 }, 134 apex_available: [ 135 "com.android.art", 136 "com.android.art.debug", 137 "test_broken_com.android.art", 138 ], 139} 140 141art_cc_library { 142 name: "libprofiled", 143 defaults: [ 144 "art_debug_defaults", 145 "libprofile_defaults", 146 ], 147 target: { 148 android: { 149 shared_libs: [ 150 "libartbased", 151 "libdexfiled", 152 ], 153 }, 154 not_windows: { 155 shared_libs: [ 156 "libartbased", 157 "libdexfiled", 158 ], 159 }, 160 windows: { 161 static_libs: [ 162 "libartbased", 163 "libdexfiled", 164 ], 165 }, 166 }, 167 apex_available: [ 168 "com.android.art.debug", 169 // TODO(b/183882457): This lib doesn't go into com.android.art, but 170 // apex_available lists need to be the same for internal libs to avoid 171 // stubs, and libartd depends on this. 172 "com.android.art", 173 "test_broken_com.android.art", 174 ], 175} 176 177// For now many of these tests still use CommonRuntimeTest, almost universally because of 178// ScratchFile and related. 179// TODO: Remove CommonRuntimeTest dependency from these tests. 180art_cc_defaults { 181 name: "art_libprofile_tests_defaults", 182 data: [ 183 ":art-gtest-jars-ManyMethods", 184 ":art-gtest-jars-MultiDex", 185 ":art-gtest-jars-ProfileTestMultiDex", 186 ], 187 srcs: [ 188 "profile/profile_boot_info_test.cc", 189 "profile/profile_compilation_info_test.cc", 190 ], 191 static_libs: [ 192 "libziparchive", 193 ], 194 shared_libs: [ 195 "libz", // libziparchive dependency; must be repeated here since it's a static lib. 196 ], 197} 198 199// Version of ART gtest `art_libprofile_tests` bundled with the ART APEX on target. 200// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. 201art_cc_test { 202 name: "art_libprofile_tests", 203 defaults: [ 204 "art_gtest_defaults", 205 "art_libprofile_tests_defaults", 206 ], 207 shared_libs: [ 208 "libartbased", 209 "libdexfiled", 210 ], 211} 212 213// Standalone version of ART gtest `art_libprofile_tests`, not bundled with the ART APEX on target. 214art_cc_test { 215 name: "art_standalone_libprofile_tests", 216 defaults: [ 217 "art_standalone_gtest_defaults", 218 "art_libprofile_tests_defaults", 219 ], 220 shared_libs: [ 221 "libartbase", 222 "libdexfile", 223 ], 224 test_config: "art_standalone_libprofile_tests.xml", 225} 226