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 17cc_defaults { 18 name: "libprofile_defaults", 19 defaults: ["art_defaults"], 20 host_supported: true, 21 srcs: [ 22 "profile/profile_boot_info.cc", 23 "profile/profile_compilation_info.cc", 24 ], 25 target: { 26 android: { 27 shared_libs: [ 28 "libartpalette", 29 "libbase", 30 ], 31 static_libs: [ 32 // ZipArchive support, the order matters here to get all symbols. 33 "libziparchive", 34 "libz", 35 ], 36 export_shared_lib_headers: ["libbase"], 37 }, 38 not_windows: { 39 shared_libs: [ 40 "libartpalette", 41 "libziparchive", 42 "libz", 43 "libbase", 44 ], 45 export_shared_lib_headers: ["libbase"], 46 }, 47 windows: { 48 cflags: ["-Wno-thread-safety"], 49 static_libs: [ 50 "libartpalette", 51 "libziparchive", 52 "libz", 53 "libbase", 54 ], 55 export_static_lib_headers: ["libbase"], 56 }, 57 darwin: { 58 enabled: true, 59 }, 60 }, 61 //generated_sources: ["art_libartbase_operator_srcs"], 62 cflags: ["-DBUILDING_LIBART=1"], 63 export_include_dirs: ["."], 64 // ART's macros.h depends on libbase's macros.h. 65 // Note: runtime_options.h depends on cmdline. But we don't really want to export this 66 // generically. dex2oat takes care of it itself. 67} 68 69cc_defaults { 70 name: "libprofile_static_base_defaults", 71 static_libs: [ 72 "libbase", 73 "libz", 74 "libziparchive", 75 ], 76} 77 78cc_defaults { 79 name: "libprofile_static_defaults", 80 defaults: [ 81 "libprofile_static_base_defaults", 82 "libartbase_static_defaults", 83 "libdexfile_static_defaults", 84 ], 85 static_libs: ["libprofile"], 86} 87 88cc_defaults { 89 name: "libprofiled_static_defaults", 90 defaults: [ 91 "libprofile_static_base_defaults", 92 "libartbased_static_defaults", 93 "libdexfiled_static_defaults", 94 ], 95 static_libs: ["libprofiled"], 96} 97 98art_cc_library { 99 name: "libprofile", 100 defaults: [ 101 "libprofile_defaults", 102 "libart_nativeunwind_defaults", 103 ], 104 shared_libs: [ 105 "libbase", 106 "libziparchive", 107 ], 108 export_shared_lib_headers: ["libbase"], 109 target: { 110 android: { 111 shared_libs: [ 112 "libartbase", 113 "libdexfile", 114 ], 115 }, 116 not_windows: { 117 shared_libs: [ 118 "libartbase", 119 "libdexfile", 120 ], 121 }, 122 windows: { 123 enabled: true, 124 shared: { 125 enabled: false, 126 }, 127 static_libs: [ 128 "libartbase", 129 "libdexfile", 130 ], 131 }, 132 }, 133 apex_available: [ 134 "com.android.art.release", 135 "com.android.art.debug", 136 ], 137} 138 139art_cc_library { 140 name: "libprofiled", 141 defaults: [ 142 "art_debug_defaults", 143 "libprofile_defaults", 144 ], 145 shared_libs: [ 146 "libbase", 147 "libziparchive", 148 ], 149 target: { 150 android: { 151 shared_libs: [ 152 "libartbased", 153 "libdexfiled", 154 ], 155 }, 156 not_windows: { 157 shared_libs: [ 158 "libartbased", 159 "libdexfiled", 160 ], 161 }, 162 windows: { 163 static_libs: [ 164 "libartbased", 165 "libdexfiled", 166 ], 167 }, 168 }, 169 export_shared_lib_headers: ["libbase"], 170 apex_available: [ 171 "com.android.art.debug", 172 ], 173} 174 175// For now many of these tests still use CommonRuntimeTest, almost universally because of 176// ScratchFile and related. 177// TODO: Remove CommonRuntimeTest dependency from these tests. 178art_cc_test { 179 name: "art_libprofile_tests", 180 defaults: [ 181 "art_gtest_defaults", 182 ], 183 srcs: [ 184 "profile/profile_boot_info_test.cc", 185 "profile/profile_compilation_info_test.cc", 186 ], 187 shared_libs: [ 188 "libartbased", 189 "libdexfiled", 190 "libartbased", 191 "libziparchive", 192 ], 193} 194