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, |
Vishwath Mohan | 07407cd | 2016-09-29 15:05:51 -0700 | [diff] [blame] | 34 | coverage: false, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 35 | }, |
| 36 | }, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 37 | }, |
| 38 | |
| 39 | |
| 40 | include_dirs: [ |
| 41 | "art/cmdline", |
| 42 | ], |
| 43 | } |
| 44 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 45 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 46 | name: "dex2oat", |
| 47 | defaults: [ |
| 48 | "dex2oat-defaults", |
| 49 | ], |
| 50 | shared_libs: [ |
| 51 | "libart", |
| 52 | "libart-compiler", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 53 | "libbase", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 54 | "libsigchain", |
| 55 | ], |
| 56 | } |
| 57 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 58 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 59 | name: "dex2oatd", |
| 60 | defaults: [ |
| 61 | "art_debug_defaults", |
| 62 | "dex2oat-defaults", |
| 63 | ], |
| 64 | shared_libs: [ |
| 65 | "libartd", |
| 66 | "libartd-compiler", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 67 | "libbase", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 68 | "libsigchain", |
| 69 | ], |
| 70 | } |
| 71 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 72 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 73 | name: "dex2oats", |
| 74 | device_supported: false, |
| 75 | static_executable: true, |
| 76 | defaults: ["dex2oat-defaults"], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 77 | target: { |
| 78 | darwin: { |
| 79 | enabled: false, |
| 80 | }, |
| 81 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 82 | ldflags: [ |
| 83 | // We need this because GC stress mode makes use of |
| 84 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 85 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 86 | // TODO: Having this is not ideal as it might obscure errors. |
| 87 | // Try to get rid of it. |
| 88 | "-z muldefs", |
| 89 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 90 | static_libs: [ |
| 91 | "libart-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 92 | "libart-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 93 | "libart", |
| 94 | "libvixl-arm", |
| 95 | "libvixl-arm64", |
| 96 | ] + art_static_dependencies, |
| 97 | } |
| 98 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 99 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 100 | name: "dex2oatds", |
| 101 | device_supported: false, |
| 102 | static_executable: true, |
| 103 | defaults: [ |
| 104 | "art_debug_defaults", |
| 105 | "dex2oat-defaults", |
| 106 | ], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 107 | target: { |
| 108 | darwin: { |
| 109 | enabled: false, |
| 110 | }, |
| 111 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 112 | ldflags: [ |
| 113 | // We need this because GC stress mode makes use of |
| 114 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 115 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 116 | // TODO: Having this is not ideal as it might obscure errors. |
| 117 | // Try to get rid of it. |
| 118 | "-z muldefs", |
| 119 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 120 | static_libs: [ |
| 121 | "libartd-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 122 | "libartd-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 123 | "libartd", |
| 124 | "libvixld-arm", |
| 125 | "libvixld-arm64", |
| 126 | ] + art_static_dependencies, |
| 127 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 128 | |
| 129 | art_cc_test { |
| 130 | name: "art_dex2oat_tests", |
| 131 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 132 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 133 | ], |
| 134 | srcs: ["dex2oat_test.cc"], |
| 135 | } |