1// 2// Copyright (C) 2011 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_library_headers { 18 name: "dex2oat_headers", 19 host_supported: true, 20 export_include_dirs: ["include"], 21} 22 23cc_defaults { 24 name: "dex2oat-defaults", 25 host_supported: true, 26 defaults: ["art_defaults"], 27 srcs: ["dex2oat.cc"], 28 29 target: { 30 android: { 31 // Use the 32-bit version of dex2oat on devices 32 compile_multilib: "prefer32", 33 34 sanitize: { 35 // ASan slows down dex2oat by ~3.5x, which translates into 36 // extremely slow first boot. Disabled to help speed up 37 // SANITIZE_TARGET mode. 38 // Bug: 22233158 39 address: false, 40 coverage: false, 41 }, 42 }, 43 }, 44 45 46 include_dirs: [ 47 "art/cmdline", 48 ], 49 header_libs: ["dex2oat_headers"], 50} 51 52art_cc_binary { 53 name: "dex2oat", 54 defaults: [ 55 "dex2oat-defaults", 56 ], 57 shared_libs: [ 58 "libart", 59 "libart-compiler", 60 "libbase", 61 "libsigchain", 62 ], 63} 64 65art_cc_binary { 66 name: "dex2oatd", 67 defaults: [ 68 "art_debug_defaults", 69 "dex2oat-defaults", 70 ], 71 shared_libs: [ 72 "libartd", 73 "libartd-compiler", 74 "libbase", 75 "libsigchain", 76 ], 77} 78 79art_cc_binary { 80 name: "dex2oats", 81 device_supported: false, 82 static_executable: true, 83 defaults: ["dex2oat-defaults"], 84 target: { 85 darwin: { 86 enabled: false, 87 }, 88 }, 89 ldflags: [ 90 // We need this because GC stress mode makes use of 91 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also 92 // defined in libgcc_eh.a(unwind-dw2.o) 93 // TODO: Having this is not ideal as it might obscure errors. 94 // Try to get rid of it. 95 "-z muldefs", 96 ], 97 static_libs: [ 98 "libart-compiler", 99 "libart-dexlayout", 100 "libart", 101 "libvixl-arm", 102 "libvixl-arm64", 103 ] + art_static_dependencies, 104} 105 106art_cc_binary { 107 name: "dex2oatds", 108 device_supported: false, 109 static_executable: true, 110 defaults: [ 111 "art_debug_defaults", 112 "dex2oat-defaults", 113 ], 114 target: { 115 darwin: { 116 enabled: false, 117 }, 118 }, 119 ldflags: [ 120 // We need this because GC stress mode makes use of 121 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also 122 // defined in libgcc_eh.a(unwind-dw2.o) 123 // TODO: Having this is not ideal as it might obscure errors. 124 // Try to get rid of it. 125 "-z muldefs", 126 ], 127 static_libs: [ 128 "libartd-compiler", 129 "libartd-dexlayout", 130 "libartd", 131 "libvixld-arm", 132 "libvixld-arm64", 133 ] + art_static_dependencies, 134} 135 136art_cc_test { 137 name: "art_dex2oat_tests", 138 defaults: [ 139 "art_gtest_defaults", 140 ], 141 srcs: ["dex2oat_test.cc"], 142 header_libs: ["dex2oat_headers"], 143} 144