1// Copyright (C) 2016 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15art_cc_defaults { 16 name: "libart-dexlayout-defaults", 17 defaults: ["art_defaults"], 18 host_supported: true, 19 srcs: [ 20 "compact_dex_writer.cc", 21 "dexlayout.cc", 22 "dex_ir.cc", 23 "dex_ir_builder.cc", 24 "dex_verify.cc", 25 "dex_visualize.cc", 26 "dex_writer.cc", 27 ], 28 export_include_dirs: ["."], 29 target: { 30 android: { 31 shared_libs: [ 32 "libartpalette", 33 "libbase", 34 ], 35 }, 36 not_windows: { 37 shared_libs: [ 38 "libartpalette", 39 "libbase", 40 ], 41 }, 42 windows: { 43 cflags: ["-Wno-thread-safety"], 44 static_libs: [ 45 "libartpalette", 46 "libbase", 47 ], 48 }, 49 }, 50 static_libs: ["libz"], 51} 52 53cc_defaults { 54 name: "libart-dexlayout_static_base_defaults", 55 static_libs: [ 56 "libbase", 57 "libz", 58 ], 59} 60 61art_cc_library { 62 name: "libart-dexlayout", 63 defaults: [ 64 "libart-dexlayout-defaults", 65 "dex2oat-pgo-defaults", 66 ], 67 target: { 68 android: { 69 lto: { 70 thin: true, 71 }, 72 shared_libs: [ 73 "libartbase", 74 "libdexfile", 75 "libprofile", 76 ], 77 }, 78 not_windows: { 79 shared_libs: [ 80 "libartbase", 81 "libdexfile", 82 "libprofile", 83 ], 84 }, 85 windows: { 86 enabled: true, 87 shared: { 88 enabled: false, 89 }, 90 static_libs: [ 91 "libartbase", 92 "libdexfile", 93 "libprofile", 94 ], 95 }, 96 }, 97 apex_available: [ 98 "com.android.art.release", 99 "com.android.art.debug", 100 ], 101} 102 103cc_defaults { 104 name: "libart-dexlayout_static_defaults", 105 defaults: [ 106 "libart-dexlayout_static_base_defaults", 107 "libartbase_static_defaults", 108 "libdexfile_static_defaults", 109 "libprofile_static_defaults", 110 ], 111 static_libs: ["libart-dexlayout"], 112} 113 114art_cc_library { 115 name: "libartd-dexlayout", 116 defaults: [ 117 "libart-dexlayout-defaults", 118 "art_debug_defaults", 119 ], 120 target: { 121 android: { 122 shared_libs: [ 123 "libartbased", 124 "libdexfiled", 125 "libprofiled", 126 ], 127 }, 128 not_windows: { 129 shared_libs: [ 130 "libartbased", 131 "libdexfiled", 132 "libprofiled", 133 ], 134 }, 135 windows: { 136 static_libs: [ 137 "libartbased", 138 "libdexfiled", 139 "libprofiled", 140 ], 141 }, 142 }, 143 apex_available: [ 144 "com.android.art.debug", 145 ], 146} 147 148cc_defaults { 149 name: "libartd-dexlayout_static_defaults", 150 defaults: [ 151 "libart-dexlayout_static_base_defaults", 152 "libartbased_static_defaults", 153 "libdexfiled_static_defaults", 154 "libprofiled_static_defaults", 155 ], 156 static_libs: ["libartd-dexlayout"], 157} 158 159cc_defaults { 160 name: "dexlayout-defaults", 161 defaults: ["art_defaults"], 162 host_supported: true, 163 shared_libs: [ 164 "libbase", 165 ], 166} 167 168art_cc_binary { 169 name: "dexlayout", 170 defaults: ["dexlayout-defaults"], 171 srcs: ["dexlayout_main.cc"], 172 shared_libs: [ 173 "libdexfile", 174 "libprofile", 175 "libartbase", 176 "libart-dexlayout", 177 ], 178 apex_available: [ 179 "com.android.art.release", 180 "com.android.art.debug", 181 ], 182} 183 184art_cc_binary { 185 name: "dexlayouts", 186 defaults: [ 187 "dexlayout-defaults", 188 "libart-dexlayout_static_defaults", 189 "libprofile_static_defaults", 190 "libdexfile_static_defaults", 191 "libartbase_static_defaults", 192 ], 193 srcs: ["dexlayout_main.cc"], 194 host_supported: true, 195 device_supported: false, 196 target: { 197 darwin: { 198 enabled: false, 199 }, 200 windows: { 201 enabled: true, 202 cflags: ["-Wno-thread-safety"], 203 }, 204 }, 205} 206 207art_cc_binary { 208 name: "dexlayoutd", 209 defaults: [ 210 "art_debug_defaults", 211 "dexlayout-defaults", 212 ], 213 srcs: ["dexlayout_main.cc"], 214 shared_libs: [ 215 "libdexfiled", 216 "libprofiled", 217 "libartbased", 218 "libartd-dexlayout", 219 ], 220 apex_available: [ 221 "com.android.art.debug", 222 ], 223} 224 225art_cc_test { 226 name: "art_dexlayout_tests", 227 defaults: ["art_gtest_defaults"], 228 shared_libs: [ 229 "libprofiled", 230 "libartd-dexlayout", 231 ], 232 srcs: ["dexlayout_test.cc"], 233} 234 235art_cc_binary { 236 name: "dexdiag", 237 defaults: ["art_defaults"], 238 host_supported: true, 239 srcs: ["dexdiag.cc"], 240 cflags: ["-Wall"], 241 shared_libs: [ 242 "libart", 243 "libdexfile", 244 "libartbase", 245 "libart-dexlayout", 246 "libbase", 247 ], 248 target: { 249 android: { 250 shared_libs: [ 251 "libmeminfo", 252 ], 253 }, 254 }, 255 apex_available: [ 256 "com.android.art.release", 257 "com.android.art.debug", 258 ], 259} 260 261art_cc_test { 262 name: "art_dexdiag_tests", 263 host_supported: true, 264 defaults: [ 265 "art_gtest_defaults", 266 ], 267 srcs: ["dexdiag_test.cc"], 268} 269