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