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_compilation_info.cc", 23 ], 24 target: { 25 android: { 26 shared_libs: [ 27 "libartbase", 28 "libartpalette", 29 "libdexfile", 30 "libbase", 31 ], 32 static_libs: [ 33 // ZipArchive support, the order matters here to get all symbols. 34 "libziparchive", 35 "libz", 36 ], 37 export_shared_lib_headers: ["libbase"], 38 }, 39 not_windows: { 40 shared_libs: [ 41 "libartbase", 42 "libartpalette", 43 "libdexfile", 44 "libziparchive", 45 "libz", 46 "libbase", 47 ], 48 export_shared_lib_headers: ["libbase"], 49 }, 50 windows: { 51 cflags: ["-Wno-thread-safety"], 52 static_libs: [ 53 "libartbase", 54 "libartpalette", 55 "libdexfile", 56 "libziparchive", 57 "libz", 58 "libbase", 59 ], 60 export_static_lib_headers: ["libbase"], 61 }, 62 darwin: { 63 enabled: true, 64 }, 65 }, 66 //generated_sources: ["art_libartbase_operator_srcs"], 67 cflags: ["-DBUILDING_LIBART=1"], 68 export_include_dirs: ["."], 69 // ART's macros.h depends on libbase's macros.h. 70 // Note: runtime_options.h depends on cmdline. But we don't really want to export this 71 // generically. dex2oat takes care of it itself. 72} 73 74cc_defaults { 75 name: "libprofile_static_base_defaults", 76 static_libs: [ 77 "libbase", 78 "libz", 79 "libziparchive", 80 ], 81} 82 83cc_defaults { 84 name: "libprofile_static_defaults", 85 defaults: [ 86 "libprofile_static_base_defaults", 87 "libartbase_static_defaults", 88 "libdexfile_static_defaults", 89 ], 90 static_libs: ["libprofile"], 91} 92 93cc_defaults { 94 name: "libprofiled_static_defaults", 95 defaults: [ 96 "libprofile_static_base_defaults", 97 "libartbased_static_defaults", 98 "libdexfiled_static_defaults", 99 ], 100 static_libs: ["libprofiled"], 101} 102 103art_cc_library { 104 name: "libprofile", 105 defaults: ["libprofile_defaults"], 106 // Leave the symbols in the shared library so that stack unwinders can 107 // produce meaningful name resolution. 108 strip: { 109 keep_symbols: true, 110 }, 111 shared_libs: [ 112 "libbase", 113 "libziparchive", 114 ], 115 export_shared_lib_headers: ["libbase"], 116 target: { 117 windows: { 118 enabled: true, 119 shared: { 120 enabled: false, 121 }, 122 }, 123 } 124} 125 126art_cc_library { 127 name: "libprofiled", 128 defaults: [ 129 "art_debug_defaults", 130 "libprofile_defaults", 131 ], 132 shared_libs: [ 133 "libbase", 134 "libziparchive", 135 ], 136 export_shared_lib_headers: ["libbase"], 137} 138 139// For now many of these tests still use CommonRuntimeTest, almost universally because of 140// ScratchFile and related. 141// TODO: Remove CommonRuntimeTest dependency from these tests. 142art_cc_test { 143 name: "art_libprofile_tests", 144 defaults: [ 145 "art_gtest_defaults", 146 ], 147 srcs: [ 148 "profile/profile_compilation_info_test.cc", 149 ], 150 shared_libs: [ 151 "libartbased", 152 "libdexfiled", 153 "libartbased", 154 "libziparchive", 155 ], 156} 157