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 | |
Andreas Gampe | 7b56591 | 2017-03-20 15:48:52 -0700 | [diff] [blame] | 17 | cc_library_headers { |
| 18 | name: "dex2oat_headers", |
| 19 | host_supported: true, |
| 20 | export_include_dirs: ["include"], |
| 21 | } |
| 22 | |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 23 | cc_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, |
Vishwath Mohan | 07407cd | 2016-09-29 15:05:51 -0700 | [diff] [blame] | 40 | coverage: false, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 41 | }, |
| 42 | }, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 43 | }, |
| 44 | |
| 45 | |
| 46 | include_dirs: [ |
| 47 | "art/cmdline", |
| 48 | ], |
Andreas Gampe | 7b56591 | 2017-03-20 15:48:52 -0700 | [diff] [blame] | 49 | header_libs: ["dex2oat_headers"], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 50 | } |
| 51 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 52 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 53 | name: "dex2oat", |
| 54 | defaults: [ |
| 55 | "dex2oat-defaults", |
| 56 | ], |
| 57 | shared_libs: [ |
| 58 | "libart", |
| 59 | "libart-compiler", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 60 | "libbase", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 61 | "libsigchain", |
| 62 | ], |
| 63 | } |
| 64 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 65 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 66 | name: "dex2oatd", |
| 67 | defaults: [ |
| 68 | "art_debug_defaults", |
| 69 | "dex2oat-defaults", |
| 70 | ], |
| 71 | shared_libs: [ |
| 72 | "libartd", |
| 73 | "libartd-compiler", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 74 | "libbase", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 75 | "libsigchain", |
| 76 | ], |
| 77 | } |
| 78 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 79 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 80 | name: "dex2oats", |
| 81 | device_supported: false, |
| 82 | static_executable: true, |
| 83 | defaults: ["dex2oat-defaults"], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 84 | target: { |
| 85 | darwin: { |
| 86 | enabled: false, |
| 87 | }, |
| 88 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 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 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 97 | static_libs: [ |
| 98 | "libart-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 99 | "libart-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 100 | "libart", |
| 101 | "libvixl-arm", |
| 102 | "libvixl-arm64", |
| 103 | ] + art_static_dependencies, |
| 104 | } |
| 105 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 106 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 107 | name: "dex2oatds", |
| 108 | device_supported: false, |
| 109 | static_executable: true, |
| 110 | defaults: [ |
| 111 | "art_debug_defaults", |
| 112 | "dex2oat-defaults", |
| 113 | ], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 114 | target: { |
| 115 | darwin: { |
| 116 | enabled: false, |
| 117 | }, |
| 118 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 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 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 127 | static_libs: [ |
| 128 | "libartd-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 129 | "libartd-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 130 | "libartd", |
| 131 | "libvixld-arm", |
| 132 | "libvixld-arm64", |
| 133 | ] + art_static_dependencies, |
| 134 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 135 | |
| 136 | art_cc_test { |
| 137 | name: "art_dex2oat_tests", |
| 138 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 139 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 140 | ], |
Mathieu Chartier | f70fe3d | 2017-06-21 15:24:02 -0700 | [diff] [blame] | 141 | srcs: [ |
| 142 | "dex2oat_test.cc", |
| 143 | "dex2oat_image_test.cc", |
| 144 | ], |
Andreas Gampe | f788297 | 2017-03-20 16:35:24 -0700 | [diff] [blame] | 145 | header_libs: ["dex2oat_headers"], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 146 | } |