| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 1 | // | 
 | 2 | // Copyright (C) 2017 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: "libunwindstack_flags", | 
 | 19 |  | 
 | 20 |     host_supported: true, | 
 | 21 |  | 
 | 22 |     cflags: [ | 
 | 23 |         "-Wall", | 
 | 24 |         "-Werror", | 
 | 25 |         "-Wextra", | 
 | 26 |     ], | 
| Christopher Ferris | 01d5037 | 2017-01-30 13:45:16 -0800 | [diff] [blame] | 27 |  | 
 | 28 |     target: { | 
 | 29 |         darwin: { | 
 | 30 |             enabled: false, | 
 | 31 |         }, | 
| Dan Willemsen | 0f04867 | 2017-09-19 17:53:12 -0700 | [diff] [blame] | 32 |         linux_bionic: { | 
 | 33 |             enabled: true, | 
 | 34 |         }, | 
| Christopher Ferris | 01d5037 | 2017-01-30 13:45:16 -0800 | [diff] [blame] | 35 |     }, | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 36 | } | 
 | 37 |  | 
| Christopher Ferris | f6d5431 | 2017-07-11 15:29:32 -0700 | [diff] [blame] | 38 | cc_library { | 
 | 39 |     name: "libunwindstack", | 
| Christopher Ferris | 6f3981c | 2017-07-27 09:29:18 -0700 | [diff] [blame] | 40 |     vendor_available: true, | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 41 |     recovery_available: true, | 
| Justin Yun | 73bd4f0 | 2017-08-04 17:33:54 +0900 | [diff] [blame] | 42 |     vndk: { | 
 | 43 |         enabled: true, | 
 | 44 |         support_system_process: true, | 
 | 45 |     }, | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 46 |     defaults: ["libunwindstack_flags"], | 
| Christopher Ferris | d226a51 | 2017-07-14 10:37:19 -0700 | [diff] [blame] | 47 |     export_include_dirs: ["include"], | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 48 |  | 
 | 49 |     srcs: [ | 
 | 50 |         "ArmExidx.cpp", | 
| David Srbecky | 18121dc | 2018-03-12 19:54:22 +0000 | [diff] [blame] | 51 |         "DexFile.cpp", | 
| David Srbecky | b9cc4fb | 2019-04-05 18:23:32 +0000 | [diff] [blame] | 52 |         "DexFiles.cpp", | 
| Christopher Ferris | 8642fcb | 2017-04-24 11:14:39 -0700 | [diff] [blame] | 53 |         "DwarfCfa.cpp", | 
| Christopher Ferris | c9dee84 | 2017-11-03 14:50:27 -0700 | [diff] [blame] | 54 |         "DwarfEhFrameWithHdr.cpp", | 
| Christopher Ferris | 72a6fa6 | 2017-03-21 12:41:17 -0700 | [diff] [blame] | 55 |         "DwarfMemory.cpp", | 
| Christopher Ferris | 55d22ef | 2017-04-04 10:41:31 -0700 | [diff] [blame] | 56 |         "DwarfOp.cpp", | 
| Christopher Ferris | 53a3c9b | 2017-05-10 18:34:15 -0700 | [diff] [blame] | 57 |         "DwarfSection.cpp", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 58 |         "Elf.cpp", | 
 | 59 |         "ElfInterface.cpp", | 
 | 60 |         "ElfInterfaceArm.cpp", | 
| Christopher Ferris | 56d0e07 | 2018-10-17 10:57:53 -0700 | [diff] [blame] | 61 |         "Global.cpp", | 
| Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame] | 62 |         "JitDebug.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 63 |         "Log.cpp", | 
| Christopher Ferris | 0d7cf3e | 2017-04-19 15:42:19 -0700 | [diff] [blame] | 64 |         "MapInfo.cpp", | 
| Christopher Ferris | 09385e7 | 2017-04-05 13:25:04 -0700 | [diff] [blame] | 65 |         "Maps.cpp", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 66 |         "Memory.cpp", | 
| Christopher Ferris | ca9a54b | 2018-04-05 11:15:00 -0700 | [diff] [blame] | 67 |         "LocalUnwinder.cpp", | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 68 |         "Regs.cpp", | 
| Christopher Ferris | d06001d | 2017-11-30 18:56:01 -0800 | [diff] [blame] | 69 |         "RegsArm.cpp", | 
 | 70 |         "RegsArm64.cpp", | 
 | 71 |         "RegsX86.cpp", | 
 | 72 |         "RegsX86_64.cpp", | 
| Douglas Leung | 61b1a1a | 2017-11-08 10:53:53 +0100 | [diff] [blame] | 73 |         "RegsMips.cpp", | 
 | 74 |         "RegsMips64.cpp", | 
| Christopher Ferris | b9de87f | 2017-09-20 13:37:24 -0700 | [diff] [blame] | 75 |         "Unwinder.cpp", | 
| Christopher Ferris | e7ba4cc | 2017-04-04 14:06:58 -0700 | [diff] [blame] | 76 |         "Symbols.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 77 |     ], | 
 | 78 |  | 
| Josh Gao | e22701e | 2017-10-23 14:25:08 -0700 | [diff] [blame] | 79 |     cflags: [ | 
 | 80 |         "-Wexit-time-destructors", | 
 | 81 |     ], | 
 | 82 |  | 
| Christopher Ferris | 5f11851 | 2017-09-01 11:17:16 -0700 | [diff] [blame] | 83 |     target: { | 
 | 84 |         // Always disable optimizations for host to make it easier to debug. | 
| Dan Willemsen | cd58088 | 2017-10-02 10:29:02 -0700 | [diff] [blame] | 85 |         host: { | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 86 |             cflags: [ | 
 | 87 |                 "-O0", | 
 | 88 |                 "-g", | 
 | 89 |             ], | 
| Christopher Ferris | 5f11851 | 2017-09-01 11:17:16 -0700 | [diff] [blame] | 90 |         }, | 
| Christopher Ferris | d70ea5e | 2018-01-30 19:47:24 -0800 | [diff] [blame] | 91 |         vendor: { | 
 | 92 |             cflags: ["-DNO_LIBDEXFILE_SUPPORT"], | 
| David Srbecky | 18121dc | 2018-03-12 19:54:22 +0000 | [diff] [blame] | 93 |             exclude_srcs: [ | 
 | 94 |                 "DexFile.cpp", | 
| David Srbecky | b9cc4fb | 2019-04-05 18:23:32 +0000 | [diff] [blame] | 95 |                 "DexFiles.cpp", | 
| David Srbecky | 18121dc | 2018-03-12 19:54:22 +0000 | [diff] [blame] | 96 |             ], | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 97 |             exclude_shared_libs: [ | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 98 |                 "libdexfile_support", | 
 | 99 |             ], | 
| Christopher Ferris | d70ea5e | 2018-01-30 19:47:24 -0800 | [diff] [blame] | 100 |         }, | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 101 |         recovery: { | 
 | 102 |             cflags: ["-DNO_LIBDEXFILE_SUPPORT"], | 
 | 103 |             exclude_srcs: [ | 
 | 104 |                 "DexFile.cpp", | 
| David Srbecky | b9cc4fb | 2019-04-05 18:23:32 +0000 | [diff] [blame] | 105 |                 "DexFiles.cpp", | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 106 |             ], | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 107 |             exclude_shared_libs: [ | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 108 |                 "libdexfile_support", | 
 | 109 |             ], | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 110 |         }, | 
| Christopher Ferris | 5f11851 | 2017-09-01 11:17:16 -0700 | [diff] [blame] | 111 |     }, | 
 | 112 |  | 
| Christopher Ferris | 2a25c4a | 2017-07-07 16:35:48 -0700 | [diff] [blame] | 113 |     arch: { | 
 | 114 |         x86: { | 
 | 115 |             srcs: ["AsmGetRegsX86.S"], | 
 | 116 |         }, | 
 | 117 |         x86_64: { | 
 | 118 |             srcs: ["AsmGetRegsX86_64.S"], | 
 | 119 |         }, | 
| Douglas Leung | 61b1a1a | 2017-11-08 10:53:53 +0100 | [diff] [blame] | 120 |         mips: { | 
 | 121 |             srcs: ["AsmGetRegsMips.S"], | 
 | 122 |         }, | 
 | 123 |         mips64: { | 
 | 124 |             srcs: ["AsmGetRegsMips64.S"], | 
 | 125 |         }, | 
| Christopher Ferris | 2a25c4a | 2017-07-07 16:35:48 -0700 | [diff] [blame] | 126 |     }, | 
 | 127 |  | 
| Christopher Ferris | eb0772f | 2018-12-05 15:57:02 -0800 | [diff] [blame] | 128 |     whole_static_libs: [ | 
 | 129 |         "libdemangle" | 
 | 130 |     ], | 
 | 131 |  | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 132 |     static_libs: [ | 
 | 133 |         "libprocinfo", | 
 | 134 |     ], | 
 | 135 |  | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 136 |     shared_libs: [ | 
 | 137 |         "libbase", | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 138 |         "libdexfile_support", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 139 |         "liblog", | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 140 |         "liblzma", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 141 |     ], | 
 | 142 | } | 
 | 143 |  | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 144 | //------------------------------------------------------------------------- | 
 | 145 | // Unit Tests | 
 | 146 | //------------------------------------------------------------------------- | 
| Christopher Ferris | ca9a54b | 2018-04-05 11:15:00 -0700 | [diff] [blame] | 147 | cc_test_library { | 
 | 148 |     name: "libunwindstack_local", | 
 | 149 |     defaults: ["libunwindstack_flags"], | 
 | 150 |     srcs: ["tests/TestLocal.cpp"], | 
 | 151 |  | 
 | 152 |     cflags: [ | 
 | 153 |         "-O0", | 
 | 154 |         "-g", | 
 | 155 |     ], | 
 | 156 |  | 
 | 157 |     shared_libs: [ | 
 | 158 |         "libunwindstack", | 
 | 159 |     ], | 
 | 160 | } | 
 | 161 |  | 
| Christopher Ferris | f6d5431 | 2017-07-11 15:29:32 -0700 | [diff] [blame] | 162 | cc_test { | 
 | 163 |     name: "libunwindstack_test", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 164 |     defaults: ["libunwindstack_flags"], | 
 | 165 |  | 
 | 166 |     srcs: [ | 
 | 167 |         "tests/ArmExidxDecodeTest.cpp", | 
 | 168 |         "tests/ArmExidxExtractTest.cpp", | 
| David Srbecky | 18121dc | 2018-03-12 19:54:22 +0000 | [diff] [blame] | 169 |         "tests/DexFileTest.cpp", | 
 | 170 |         "tests/DexFilesTest.cpp", | 
| Christopher Ferris | 8642fcb | 2017-04-24 11:14:39 -0700 | [diff] [blame] | 171 |         "tests/DwarfCfaLogTest.cpp", | 
 | 172 |         "tests/DwarfCfaTest.cpp", | 
| Christopher Ferris | 61d4097 | 2017-06-12 19:14:20 -0700 | [diff] [blame] | 173 |         "tests/DwarfDebugFrameTest.cpp", | 
 | 174 |         "tests/DwarfEhFrameTest.cpp", | 
| Christopher Ferris | c9dee84 | 2017-11-03 14:50:27 -0700 | [diff] [blame] | 175 |         "tests/DwarfEhFrameWithHdrTest.cpp", | 
| Christopher Ferris | 72a6fa6 | 2017-03-21 12:41:17 -0700 | [diff] [blame] | 176 |         "tests/DwarfMemoryTest.cpp", | 
| Christopher Ferris | 55d22ef | 2017-04-04 10:41:31 -0700 | [diff] [blame] | 177 |         "tests/DwarfOpLogTest.cpp", | 
 | 178 |         "tests/DwarfOpTest.cpp", | 
| Christopher Ferris | 53a3c9b | 2017-05-10 18:34:15 -0700 | [diff] [blame] | 179 |         "tests/DwarfSectionTest.cpp", | 
 | 180 |         "tests/DwarfSectionImplTest.cpp", | 
| Christopher Ferris | 0b79ae1 | 2018-01-25 12:15:56 -0800 | [diff] [blame] | 181 |         "tests/ElfCacheTest.cpp", | 
| Christopher Ferris | f6f691b | 2017-09-25 19:23:07 -0700 | [diff] [blame] | 182 |         "tests/ElfFake.cpp", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 183 |         "tests/ElfInterfaceArmTest.cpp", | 
 | 184 |         "tests/ElfInterfaceTest.cpp", | 
 | 185 |         "tests/ElfTest.cpp", | 
| Christopher Ferris | 570b76f | 2017-06-30 17:18:16 -0700 | [diff] [blame] | 186 |         "tests/ElfTestUtils.cpp", | 
| Christopher Ferris | 150db12 | 2017-12-20 18:49:01 -0800 | [diff] [blame] | 187 |         "tests/JitDebugTest.cpp", | 
| Christopher Ferris | ca9a54b | 2018-04-05 11:15:00 -0700 | [diff] [blame] | 188 |         "tests/LocalUnwinderTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 189 |         "tests/LogFake.cpp", | 
| Christopher Ferris | 9d5712c | 2018-10-01 21:01:09 -0700 | [diff] [blame] | 190 |         "tests/MapInfoCreateMemoryTest.cpp", | 
| Christopher Ferris | bf373ed | 2019-01-16 17:23:39 -0800 | [diff] [blame] | 191 |         "tests/MapInfoGetBuildIDTest.cpp", | 
| Christopher Ferris | 570b76f | 2017-06-30 17:18:16 -0700 | [diff] [blame] | 192 |         "tests/MapInfoGetElfTest.cpp", | 
| Christopher Ferris | b7de5f5 | 2017-12-01 21:37:37 -0800 | [diff] [blame] | 193 |         "tests/MapInfoGetLoadBiasTest.cpp", | 
| Christopher Ferris | eb0772f | 2018-12-05 15:57:02 -0800 | [diff] [blame] | 194 |         "tests/MapInfoTest.cpp", | 
| Christopher Ferris | 09385e7 | 2017-04-05 13:25:04 -0700 | [diff] [blame] | 195 |         "tests/MapsTest.cpp", | 
| Christopher Ferris | f6d5431 | 2017-07-11 15:29:32 -0700 | [diff] [blame] | 196 |         "tests/MemoryBufferTest.cpp", | 
| Christopher Ferris | ef64010 | 2018-11-14 15:36:45 -0800 | [diff] [blame] | 197 |         "tests/MemoryCacheTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 198 |         "tests/MemoryFake.cpp", | 
 | 199 |         "tests/MemoryFileTest.cpp", | 
 | 200 |         "tests/MemoryLocalTest.cpp", | 
| Christopher Ferris | 6633b0c | 2018-04-03 16:03:28 -0700 | [diff] [blame] | 201 |         "tests/MemoryOfflineBufferTest.cpp", | 
| Josh Gao | f4a94c4 | 2017-11-13 16:16:27 -0800 | [diff] [blame] | 202 |         "tests/MemoryOfflineTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 203 |         "tests/MemoryRangeTest.cpp", | 
| Christopher Ferris | 9d5712c | 2018-10-01 21:01:09 -0700 | [diff] [blame] | 204 |         "tests/MemoryRangesTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 205 |         "tests/MemoryRemoteTest.cpp", | 
| Christopher Ferris | 9744fb2 | 2017-07-07 12:18:16 -0700 | [diff] [blame] | 206 |         "tests/MemoryTest.cpp", | 
| Christopher Ferris | 2786608 | 2018-08-02 15:21:37 -0700 | [diff] [blame] | 207 |         "tests/RegsInfoTest.cpp", | 
| Josh Gao | 6f580d8 | 2017-09-22 12:57:15 -0700 | [diff] [blame] | 208 |         "tests/RegsIterateTest.cpp", | 
| Christopher Ferris | eb4a6db | 2017-07-19 12:37:45 -0700 | [diff] [blame] | 209 |         "tests/RegsStepIfSignalHandlerTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 210 |         "tests/RegsTest.cpp", | 
| Christopher Ferris | e7ba4cc | 2017-04-04 14:06:58 -0700 | [diff] [blame] | 211 |         "tests/SymbolsTest.cpp", | 
| Christopher Ferris | e1f7a63 | 2019-01-24 12:22:03 -0800 | [diff] [blame] | 212 |         "tests/TestUtils.cpp", | 
| Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 213 |         "tests/UnwindOfflineTest.cpp", | 
| Christopher Ferris | 2a25c4a | 2017-07-07 16:35:48 -0700 | [diff] [blame] | 214 |         "tests/UnwindTest.cpp", | 
| Christopher Ferris | f6f691b | 2017-09-25 19:23:07 -0700 | [diff] [blame] | 215 |         "tests/UnwinderTest.cpp", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 216 |     ], | 
 | 217 |  | 
 | 218 |     cflags: [ | 
 | 219 |         "-O0", | 
 | 220 |         "-g", | 
 | 221 |     ], | 
 | 222 |  | 
 | 223 |     shared_libs: [ | 
 | 224 |         "libbase", | 
 | 225 |         "liblog", | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 226 |         "liblzma", | 
| Christopher Ferris | f6d5431 | 2017-07-11 15:29:32 -0700 | [diff] [blame] | 227 |         "libunwindstack", | 
| Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 228 |         "libdexfile_support", | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 229 |     ], | 
 | 230 |  | 
| Christopher Ferris | 53a3c9b | 2017-05-10 18:34:15 -0700 | [diff] [blame] | 231 |     static_libs: [ | 
 | 232 |         "libgmock", | 
 | 233 |     ], | 
 | 234 |  | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 235 |     test_suites: ["device-tests"], | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 236 |     data: [ | 
| Christopher Ferris | 570b76f | 2017-06-30 17:18:16 -0700 | [diff] [blame] | 237 |         "tests/files/elf32.xz", | 
 | 238 |         "tests/files/elf64.xz", | 
| Yabin Cui | 11e96fe | 2018-03-14 18:16:22 -0700 | [diff] [blame] | 239 |         "tests/files/offline/art_quick_osr_stub_arm/*", | 
| Christopher Ferris | 1a141a0 | 2018-01-24 08:52:47 -0800 | [diff] [blame] | 240 |         "tests/files/offline/bad_eh_frame_hdr_arm64/*", | 
 | 241 |         "tests/files/offline/debug_frame_first_x86/*", | 
| Christopher Ferris | 4cc36d2 | 2018-06-06 14:47:31 -0700 | [diff] [blame] | 242 |         "tests/files/offline/debug_frame_load_bias_arm/*", | 
| Christopher Ferris | e37e2d0 | 2018-02-09 15:57:39 -0800 | [diff] [blame] | 243 |         "tests/files/offline/eh_frame_hdr_begin_x86_64/*", | 
| Christopher Ferris | d49499d | 2019-06-10 18:37:32 -0700 | [diff] [blame] | 244 |         "tests/files/offline/invalid_elf_offset_arm/*", | 
| Christopher Ferris | 5f5cb23 | 2018-02-05 13:07:06 -0800 | [diff] [blame] | 245 |         "tests/files/offline/jit_debug_arm/*", | 
 | 246 |         "tests/files/offline/jit_debug_x86/*", | 
| Yabin Cui | d5b22c5 | 2018-02-22 17:11:31 -0800 | [diff] [blame] | 247 |         "tests/files/offline/jit_map_arm/*", | 
| Christopher Ferris | 5f5cb23 | 2018-02-05 13:07:06 -0800 | [diff] [blame] | 248 |         "tests/files/offline/gnu_debugdata_arm/*", | 
| Christopher Ferris | 239425b | 2018-05-17 18:37:38 -0700 | [diff] [blame] | 249 |         "tests/files/offline/offset_arm/*", | 
| Christopher Ferris | 01040b1 | 2018-12-10 11:13:23 -0800 | [diff] [blame] | 250 |         "tests/files/offline/shared_lib_in_apk_arm64/*", | 
 | 251 |         "tests/files/offline/shared_lib_in_apk_memory_only_arm64/*", | 
| Christopher Ferris | 86f2d9d | 2019-03-12 15:17:36 -0700 | [diff] [blame] | 252 |         "tests/files/offline/shared_lib_in_apk_single_map_arm64/*", | 
| Christopher Ferris | 5f5cb23 | 2018-02-05 13:07:06 -0800 | [diff] [blame] | 253 |         "tests/files/offline/straddle_arm/*", | 
| Christopher Ferris | c3d79f7 | 2017-11-28 19:14:54 -0800 | [diff] [blame] | 254 |         "tests/files/offline/straddle_arm64/*", | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 255 |     ], | 
| Elliott Hughes | f6d7594 | 2018-06-06 10:48:41 -0700 | [diff] [blame] | 256 |     required: [ | 
 | 257 |         "libunwindstack_local", | 
 | 258 |     ], | 
| Christopher Ferris | 723cf9b | 2017-01-19 20:08:48 -0800 | [diff] [blame] | 259 | } | 
 | 260 |  | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 261 | //------------------------------------------------------------------------- | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 262 | // Tools | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 263 | //------------------------------------------------------------------------- | 
 | 264 | cc_defaults { | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 265 |     name: "libunwindstack_tools", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 266 |     defaults: ["libunwindstack_flags"], | 
 | 267 |  | 
 | 268 |     shared_libs: [ | 
 | 269 |         "libunwindstack", | 
 | 270 |         "libbase", | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 271 |         "liblzma", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 272 |     ], | 
| Andreas Gampe | 8ccbe42 | 2018-05-21 08:24:20 -0700 | [diff] [blame] | 273 |     target: { | 
 | 274 |         // Always disable optimizations for host to make it easier to debug. | 
 | 275 |         host: { | 
 | 276 |             cflags: [ | 
 | 277 |                 "-O0", | 
 | 278 |                 "-g", | 
 | 279 |             ], | 
 | 280 |         }, | 
 | 281 |     }, | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 282 | } | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 283 |  | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 284 | cc_binary { | 
 | 285 |     name: "unwind", | 
 | 286 |     defaults: ["libunwindstack_tools"], | 
 | 287 |  | 
 | 288 |     srcs: [ | 
 | 289 |         "tools/unwind.cpp", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 290 |     ], | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 291 | } | 
 | 292 |  | 
 | 293 | cc_binary { | 
 | 294 |     name: "unwind_info", | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 295 |     defaults: ["libunwindstack_tools"], | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 296 |  | 
 | 297 |     srcs: [ | 
| Christopher Ferris | b5d7a87 | 2017-07-12 15:40:52 -0700 | [diff] [blame] | 298 |         "tools/unwind_info.cpp", | 
 | 299 |     ], | 
 | 300 | } | 
 | 301 |  | 
 | 302 | cc_binary { | 
 | 303 |     name: "unwind_symbols", | 
 | 304 |     defaults: ["libunwindstack_tools"], | 
 | 305 |  | 
 | 306 |     srcs: [ | 
 | 307 |         "tools/unwind_symbols.cpp", | 
| Christopher Ferris | 3958f80 | 2017-02-01 15:44:40 -0800 | [diff] [blame] | 308 |     ], | 
 | 309 | } | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 310 |  | 
| Christopher Ferris | 3dfd2ae | 2017-12-15 20:00:59 -0800 | [diff] [blame] | 311 | cc_binary { | 
 | 312 |     name: "unwind_for_offline", | 
 | 313 |     defaults: ["libunwindstack_tools"], | 
 | 314 |  | 
 | 315 |     srcs: [ | 
 | 316 |         "tools/unwind_for_offline.cpp", | 
 | 317 |     ], | 
 | 318 | } | 
 | 319 |  | 
| Christopher Ferris | e37e2d0 | 2018-02-09 15:57:39 -0800 | [diff] [blame] | 320 | cc_binary { | 
 | 321 |     name: "unwind_reg_info", | 
 | 322 |     defaults: ["libunwindstack_tools"], | 
 | 323 |  | 
 | 324 |     srcs: [ | 
 | 325 |         "tools/unwind_reg_info.cpp", | 
 | 326 |     ], | 
 | 327 | } | 
 | 328 |  | 
| Christopher Ferris | ef64010 | 2018-11-14 15:36:45 -0800 | [diff] [blame] | 329 | //------------------------------------------------------------------------- | 
 | 330 | // Benchmarks | 
 | 331 | //------------------------------------------------------------------------- | 
 | 332 | cc_benchmark { | 
 | 333 |     name: "unwind_benchmarks", | 
 | 334 |     host_supported: true, | 
 | 335 |     defaults: ["libunwindstack_flags"], | 
 | 336 |  | 
 | 337 |     // Disable optimizations so that all of the calls are not optimized away. | 
 | 338 |     cflags: [ | 
 | 339 |         "-O0", | 
 | 340 |     ], | 
 | 341 |  | 
 | 342 |     srcs: [ | 
 | 343 |         "benchmarks/unwind_benchmarks.cpp", | 
 | 344 |     ], | 
 | 345 |  | 
 | 346 |     shared_libs: [ | 
| Christopher Ferris | bf373ed | 2019-01-16 17:23:39 -0800 | [diff] [blame] | 347 |         "libbase", | 
| Christopher Ferris | ef64010 | 2018-11-14 15:36:45 -0800 | [diff] [blame] | 348 |         "libunwindstack", | 
 | 349 |     ], | 
 | 350 | } | 
 | 351 |  | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 352 | // Generates the elf data for use in the tests for .gnu_debugdata frames. | 
 | 353 | // Once these files are generated, use the xz command to compress the data. | 
 | 354 | cc_binary_host { | 
 | 355 |     name: "gen_gnudebugdata", | 
| Christopher Ferris | f6d5431 | 2017-07-11 15:29:32 -0700 | [diff] [blame] | 356 |     defaults: ["libunwindstack_flags"], | 
| Christopher Ferris | bae69f1 | 2017-06-28 14:51:54 -0700 | [diff] [blame] | 357 |  | 
 | 358 |     srcs: [ | 
 | 359 |         "tests/GenGnuDebugdata.cpp", | 
 | 360 |     ], | 
 | 361 | } |