Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 15 | art_cc_defaults { |
| 16 | name: "libart-dexlayout-defaults", |
David Sehr | 7639cdc | 2017-04-15 10:06:21 -0700 | [diff] [blame] | 17 | defaults: ["art_defaults"], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 18 | host_supported: true, |
| 19 | srcs: [ |
Mathieu Chartier | f95a75e | 2017-11-03 15:25:52 -0700 | [diff] [blame] | 20 | "compact_dex_writer.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 21 | "dexlayout.cc", |
Jeff Hao | 3ab96b4 | 2016-09-09 18:35:01 -0700 | [diff] [blame] | 22 | "dex_ir.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 23 | "dex_ir_builder.cc", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 24 | "dex_verify.cc", |
David Sehr | cdcfde7 | 2016-09-26 07:44:04 -0700 | [diff] [blame] | 25 | "dex_visualize.cc", |
Jeff Hao | a862100 | 2016-10-04 18:13:44 +0000 | [diff] [blame] | 26 | "dex_writer.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 27 | ], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 28 | export_include_dirs: ["."], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 29 | target: { |
| 30 | android: { |
| 31 | shared_libs: [ |
Orion Hodson | e6e01a0 | 2019-01-30 14:02:30 +0000 | [diff] [blame] | 32 | "libartbase", |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 33 | "libartpalette", |
| 34 | "libdexfile", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 35 | "libprofile", |
| 36 | "libbase", |
| 37 | ], |
| 38 | }, |
| 39 | not_windows: { |
| 40 | shared_libs: [ |
Orion Hodson | e6e01a0 | 2019-01-30 14:02:30 +0000 | [diff] [blame] | 41 | "libartbase", |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 42 | "libartpalette", |
| 43 | "libdexfile", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 44 | "libprofile", |
| 45 | "libbase", |
| 46 | ], |
| 47 | }, |
| 48 | windows: { |
| 49 | cflags: ["-Wno-thread-safety"], |
| 50 | static_libs: [ |
Orion Hodson | e6e01a0 | 2019-01-30 14:02:30 +0000 | [diff] [blame] | 51 | "libartbase", |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 52 | "libartpalette", |
| 53 | "libdexfile", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 54 | "libprofile", |
| 55 | "libbase", |
| 56 | ], |
| 57 | }, |
| 58 | }, |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 59 | static_libs: ["libz"], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 60 | } |
| 61 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 62 | cc_defaults { |
| 63 | name: "libart-dexlayout_static_base_defaults", |
| 64 | static_libs: [ |
| 65 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 66 | "libz", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 67 | ], |
| 68 | } |
| 69 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 70 | art_cc_library { |
| 71 | name: "libart-dexlayout", |
Pirama Arumuga Nainar | 42d5805 | 2018-04-18 22:59:36 -0700 | [diff] [blame] | 72 | defaults: [ |
| 73 | "libart-dexlayout-defaults", |
| 74 | "dex2oat-pgo-defaults", |
| 75 | ], |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 76 | target: { |
| 77 | android: { |
| 78 | lto: { |
| 79 | thin: true, |
| 80 | }, |
| 81 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 82 | windows: { |
| 83 | enabled: true, |
| 84 | shared: { |
| 85 | enabled: false, |
| 86 | }, |
| 87 | }, |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 88 | }, |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 89 | } |
| 90 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 91 | cc_defaults { |
| 92 | name: "libart-dexlayout_static_defaults", |
| 93 | defaults: [ |
| 94 | "libart-dexlayout_static_base_defaults", |
| 95 | "libartbase_static_defaults", |
| 96 | "libdexfile_static_defaults", |
| 97 | "libprofile_static_defaults", |
| 98 | ], |
| 99 | static_libs: ["libart-dexlayout"], |
| 100 | } |
| 101 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 102 | art_cc_library { |
| 103 | name: "libartd-dexlayout", |
Mathieu Chartier | 5929beb | 2017-10-20 23:24:10 -0700 | [diff] [blame] | 104 | defaults: [ |
| 105 | "libart-dexlayout-defaults", |
| 106 | "art_debug_defaults", |
| 107 | ], |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 108 | shared_libs: [ |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 109 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 110 | "libartbased", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 111 | "libprofiled", |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 112 | ], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 113 | } |
| 114 | |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 115 | cc_defaults { |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 116 | name: "libartd-dexlayout_static_defaults", |
| 117 | defaults: [ |
| 118 | "libart-dexlayout_static_base_defaults", |
| 119 | "libartbased_static_defaults", |
| 120 | "libdexfiled_static_defaults", |
| 121 | "libprofiled_static_defaults", |
| 122 | ], |
| 123 | static_libs: ["libartd-dexlayout"], |
| 124 | } |
| 125 | |
| 126 | cc_defaults { |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 127 | name: "dexlayout-defaults", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 128 | defaults: ["art_defaults"], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 129 | host_supported: true, |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 130 | shared_libs: [ |
| 131 | "libbase", |
| 132 | ], |
| 133 | } |
| 134 | |
| 135 | art_cc_binary { |
| 136 | name: "dexlayout", |
| 137 | defaults: ["dexlayout-defaults"], |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 138 | srcs: ["dexlayout_main.cc"], |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 139 | shared_libs: [ |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 140 | "libdexfile", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 141 | "libprofile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 142 | "libartbase", |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 143 | "libart-dexlayout", |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 144 | ], |
| 145 | } |
| 146 | |
| 147 | art_cc_binary { |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 148 | name: "dexlayouts", |
| 149 | defaults: [ |
| 150 | "dexlayout-defaults", |
| 151 | "libart-dexlayout_static_defaults", |
| 152 | "libprofile_static_defaults", |
| 153 | "libdexfile_static_defaults", |
| 154 | "libartbase_static_defaults", |
| 155 | ], |
| 156 | srcs: ["dexlayout_main.cc"], |
| 157 | host_supported: true, |
| 158 | device_supported: false, |
| 159 | target: { |
| 160 | darwin: { |
| 161 | enabled: false, |
| 162 | }, |
| 163 | windows: { |
| 164 | enabled: true, |
| 165 | cflags: ["-Wno-thread-safety"], |
| 166 | }, |
| 167 | }, |
| 168 | } |
| 169 | |
| 170 | art_cc_binary { |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 171 | name: "dexlayoutd", |
| 172 | defaults: [ |
| 173 | "art_debug_defaults", |
| 174 | "dexlayout-defaults", |
| 175 | ], |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 176 | srcs: ["dexlayout_main.cc"], |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 177 | shared_libs: [ |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 178 | "libdexfiled", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 179 | "libprofiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 180 | "libartbased", |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 181 | "libartd-dexlayout", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 182 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 183 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 184 | |
| 185 | art_cc_test { |
| 186 | name: "art_dexlayout_tests", |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 187 | defaults: ["art_gtest_defaults"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 188 | shared_libs: [ |
| 189 | "libprofiled", |
| 190 | "libartd-dexlayout", |
| 191 | ], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 192 | srcs: ["dexlayout_test.cc"], |
| 193 | } |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 194 | |
| 195 | art_cc_binary { |
| 196 | name: "dexdiag", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 197 | defaults: ["art_defaults"], |
| 198 | host_supported: true, |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 199 | srcs: ["dexdiag.cc"], |
| 200 | cflags: ["-Wall"], |
| 201 | shared_libs: [ |
| 202 | "libart", |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 203 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 204 | "libartbase", |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 205 | "libart-dexlayout", |
Andreas Gampe | 281fee0 | 2018-03-05 12:59:30 -0800 | [diff] [blame] | 206 | "libbase", |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 207 | ], |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 208 | target: { |
| 209 | android: { |
| 210 | shared_libs: [ |
Sandeep Patil | 2110de5 | 2019-01-21 17:21:09 -0800 | [diff] [blame] | 211 | "libmeminfo", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame] | 212 | ], |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 213 | }, |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame] | 214 | }, |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 215 | } |
| 216 | |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 217 | art_cc_test { |
| 218 | name: "art_dexdiag_tests", |
| 219 | host_supported: true, |
| 220 | defaults: [ |
| 221 | "art_gtest_defaults", |
| 222 | ], |
| 223 | srcs: ["dexdiag_test.cc"], |
| 224 | } |