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