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