Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame^] | 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 | |
| 17 | cc_defaults { |
| 18 | name: "dex2oat-defaults", |
| 19 | host_supported: true, |
| 20 | defaults: ["art_defaults"], |
| 21 | srcs: ["dex2oat.cc"], |
| 22 | |
| 23 | target: { |
| 24 | android: { |
| 25 | // Use the 32-bit version of dex2oat on devices |
| 26 | compile_multilib: "prefer32", |
| 27 | |
| 28 | sanitize: { |
| 29 | // ASan slows down dex2oat by ~3.5x, which translates into |
| 30 | // extremely slow first boot. Disabled to help speed up |
| 31 | // SANITIZE_TARGET mode. |
| 32 | // Bug: 22233158 |
| 33 | address: false, |
| 34 | }, |
| 35 | }, |
| 36 | |
| 37 | host: { |
| 38 | ldflags: [ |
| 39 | // We need this because GC stress mode makes use of |
| 40 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 41 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 42 | // TODO: Having this is not ideal as it might obscure errors. |
| 43 | // Try to get rid of it. |
| 44 | "-z muldefs", |
| 45 | ], |
| 46 | }, |
| 47 | }, |
| 48 | |
| 49 | |
| 50 | include_dirs: [ |
| 51 | "art/cmdline", |
| 52 | ], |
| 53 | } |
| 54 | |
| 55 | cc_binary { |
| 56 | name: "dex2oat", |
| 57 | defaults: [ |
| 58 | "dex2oat-defaults", |
| 59 | ], |
| 60 | shared_libs: [ |
| 61 | "libart", |
| 62 | "libart-compiler", |
| 63 | "libsigchain", |
| 64 | ], |
| 65 | } |
| 66 | |
| 67 | cc_binary { |
| 68 | name: "dex2oatd", |
| 69 | defaults: [ |
| 70 | "art_debug_defaults", |
| 71 | "dex2oat-defaults", |
| 72 | ], |
| 73 | shared_libs: [ |
| 74 | "libartd", |
| 75 | "libartd-compiler", |
| 76 | "libsigchain", |
| 77 | ], |
| 78 | } |
| 79 | |
| 80 | cc_binary { |
| 81 | name: "dex2oats", |
| 82 | device_supported: false, |
| 83 | static_executable: true, |
| 84 | defaults: ["dex2oat-defaults"], |
| 85 | static_libs: [ |
| 86 | "libart-compiler", |
| 87 | "libart", |
| 88 | "libvixl-arm", |
| 89 | "libvixl-arm64", |
| 90 | ] + art_static_dependencies, |
| 91 | } |
| 92 | |
| 93 | cc_binary { |
| 94 | name: "dex2oatds", |
| 95 | device_supported: false, |
| 96 | static_executable: true, |
| 97 | defaults: [ |
| 98 | "art_debug_defaults", |
| 99 | "dex2oat-defaults", |
| 100 | ], |
| 101 | static_libs: [ |
| 102 | "libartd-compiler", |
| 103 | "libartd", |
| 104 | "libvixld-arm", |
| 105 | "libvixld-arm64", |
| 106 | ] + art_static_dependencies, |
| 107 | } |