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