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