summaryrefslogtreecommitdiff
path: root/chromium/third_party/libunwindstack/BUILD.gn
blob: 7061a8a35de7a0a205b8ff25841e41de03270279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("libdexfile_defines") {
  defines = [
    "DEXFILE_SUPPORT",
    # To link libdexfile statically, instead of dynamically loading at
    # runtime as it is done in Android platform.
    "STATIC_LIB",
  ]
}

config("libunwindstack_config") {
  cflags = [
    "-I",
    rebase_path("src/libunwindstack/include", root_build_dir),
  ]
}

config("warnings") {
  cflags = [
    "-Wno-c99-designator",
    "-Wno-shadow",
    "-Wno-unused-but-set-variable",
  ]
}

source_set("libunwindstack") {
  visibility = [
    "//base:native_unwinder_android",
  ]
  include_dirs = [
    "//third_party/libunwindstack/src/android-base/include",
    "//third_party/libunwindstack/src/libartbase",
    "//third_party/libunwindstack/src/libdexfile",
    "//third_party/libunwindstack/src/libdexfile/external/include",
    "//third_party/libunwindstack/src/libprocinfo/include",
    "//third_party/libunwindstack/src/libunwindstack/include",
  ]

  public = [
    "src/libunwindstack/include/GlobalDebugInterface.h",
    "src/libunwindstack/include/unwindstack/Arch.h",
    "src/libunwindstack/include/unwindstack/DexFiles.h",
    "src/libunwindstack/include/unwindstack/DwarfError.h",
    "src/libunwindstack/include/unwindstack/DwarfLocation.h",
    "src/libunwindstack/include/unwindstack/DwarfMemory.h",
    "src/libunwindstack/include/unwindstack/DwarfSection.h",
    "src/libunwindstack/include/unwindstack/DwarfStructs.h",
    "src/libunwindstack/include/unwindstack/Elf.h",
    "src/libunwindstack/include/unwindstack/ElfInterface.h",
    "src/libunwindstack/include/unwindstack/Error.h",
    "src/libunwindstack/include/unwindstack/Global.h",
    "src/libunwindstack/include/unwindstack/JitDebug.h",
    "src/libunwindstack/include/unwindstack/Log.h",
    "src/libunwindstack/include/unwindstack/MachineArm64.h",
    "src/libunwindstack/include/unwindstack/MachineArm.h",
    "src/libunwindstack/include/unwindstack/MachineMips64.h",
    "src/libunwindstack/include/unwindstack/MachineMips.h",
    "src/libunwindstack/include/unwindstack/MachineX86_64.h",
    "src/libunwindstack/include/unwindstack/MachineX86.h",
    "src/libunwindstack/include/unwindstack/MapInfo.h",
    "src/libunwindstack/include/unwindstack/Maps.h",
    "src/libunwindstack/include/unwindstack/Memory.h",
    "src/libunwindstack/include/unwindstack/RegsArm64.h",
    "src/libunwindstack/include/unwindstack/RegsArm.h",
    "src/libunwindstack/include/unwindstack/Regs.h",
    "src/libunwindstack/include/unwindstack/RegsMips64.h",
    "src/libunwindstack/include/unwindstack/RegsMips.h",
    "src/libunwindstack/include/unwindstack/RegsX86_64.h",
    "src/libunwindstack/include/unwindstack/RegsX86.h",
    "src/libunwindstack/include/unwindstack/SharedString.h",
    "src/libunwindstack/include/unwindstack/UcontextArm64.h",
    "src/libunwindstack/include/unwindstack/UcontextArm.h",
    "src/libunwindstack/include/unwindstack/UcontextMips64.h",
    "src/libunwindstack/include/unwindstack/UcontextMips.h",
    "src/libunwindstack/include/unwindstack/UcontextX86_64.h",
    "src/libunwindstack/include/unwindstack/UcontextX86.h",
    "src/libunwindstack/include/unwindstack/Unwinder.h",
    "src/libunwindstack/include/unwindstack/UserArm64.h",
    "src/libunwindstack/include/unwindstack/UserArm.h",
    "src/libunwindstack/include/unwindstack/UserMips64.h",
    "src/libunwindstack/include/unwindstack/UserMips.h",
    "src/libunwindstack/include/unwindstack/UserX86_64.h",
    "src/libunwindstack/include/unwindstack/UserX86.h",
  ]
  sources = [
    "src/android-base/file.cpp",
    "src/android-base/include/android-base/errno_restorer.h",
    "src/android-base/include/android-base/file.h",
    "src/android-base/include/android-base/logging.h",
    "src/android-base/include/android-base/macros.h",
    "src/android-base/include/android-base/mapped_file.h",
    "src/android-base/include/android-base/off64_t.h",
    "src/android-base/include/android-base/parseint.h",
    "src/android-base/include/android-base/stringprintf.h",
    "src/android-base/include/android-base/strings.h",
    "src/android-base/include/android-base/thread_annotations.h",
    "src/android-base/include/android-base/threads.h",
    "src/android-base/include/android-base/unique_fd.h",
    "src/android-base/include/android-base/utf8.h",
    "src/android-base/posix_strerror_r.cpp",
    "src/android-base/stringprintf.cpp",
    "src/android-base/strings.cpp",
    "src/android-base/threads.cpp",
    "src/libartbase/base/bit_utils.h",
    "src/libartbase/base/casts.h",
    "src/libartbase/base/data_hash.h",
    "src/libartbase/base/dumpable.h",
    "src/libartbase/base/enums.h",
    "src/libartbase/base/globals.h",
    "src/libartbase/base/hash_map.h",
    "src/libartbase/base/hash_set.h",
    "src/libartbase/base/hiddenapi_domain.h",
    "src/libartbase/base/hiddenapi_flags.h",
    "src/libartbase/base/hiddenapi_stubs.h",
    "src/libartbase/base/iteration_range.h",
    "src/libartbase/base/leb128.h",
    "src/libartbase/base/macros.h",
    "src/libartbase/base/memory_tool.h",
    "src/libartbase/base/mman.h",
    "src/libartbase/base/safe_map.h",
    "src/libartbase/base/sdk_version.h",
    "src/libartbase/base/stl_util.h",
    "src/libartbase/base/stl_util_identity.h",
    "src/libartbase/base/string_view_cpp20.h",
    "src/libartbase/base/utils.h",
    "src/libartbase/base/value_object.h",
    "src/libdexfile/dex/class_accessor.h",
    "src/libdexfile/dex/class_accessor-inl.h",
    "src/libdexfile/dex/class_iterator.h",
    "src/libdexfile/dex/code_item_accessors.h",
    "src/libdexfile/dex/code_item_accessors-inl.h",
    "src/libdexfile/dex/compact_dex_file.cc",
    "src/libdexfile/dex/compact_dex_file.h",
    "src/libdexfile/dex/compact_dex_utils.h",
    "src/libdexfile/dex/compact_offset_table.cc",
    "src/libdexfile/dex/compact_offset_table.h",
    "src/libdexfile/dex/descriptors_names.cc",
    "src/libdexfile/dex/descriptors_names.h",
    "src/libdexfile/dex/dex_file.cc",
    "src/libdexfile/dex/dex_file_exception_helpers.cc",
    "src/libdexfile/dex/dex_file_exception_helpers.h",
    "src/libdexfile/dex/dex_file.h",
    "src/libdexfile/dex/dex_file-inl.h",
    "src/libdexfile/dex/dex_file_layout.cc",
    "src/libdexfile/dex/dex_file_layout.h",
    "src/libdexfile/dex/dex_file_loader.cc",
    "src/libdexfile/dex/dex_file_loader.h",
    "src/libdexfile/dex/dex_file_reference.h",
    "src/libdexfile/dex/dex_file_structs.h",
    "src/libdexfile/dex/dex_file_tracking_registrar.cc",
    "src/libdexfile/dex/dex_file_tracking_registrar.h",
    "src/libdexfile/dex/dex_file_types.h",
    "src/libdexfile/dex/dex_file_verifier.cc",
    "src/libdexfile/dex/dex_file_verifier.h",
    "src/libdexfile/dex/dex_instruction.cc",
    "src/libdexfile/dex/dex_instruction.h",
    "src/libdexfile/dex/dex_instruction-inl.h",
    "src/libdexfile/dex/dex_instruction_iterator.h",
    "src/libdexfile/dex/dex_instruction_list.h",
    "src/libdexfile/dex/invoke_type.h",
    "src/libdexfile/dex/method_reference.h",
    "src/libdexfile/dex/modifiers.cc",
    "src/libdexfile/dex/modifiers.h",
    "src/libdexfile/dex/primitive.cc",
    "src/libdexfile/dex/primitive.h",
    "src/libdexfile/dex/signature.cc",
    "src/libdexfile/dex/signature.h",
    "src/libdexfile/dex/signature-inl.h",
    "src/libdexfile/dex/standard_dex_file.cc",
    "src/libdexfile/dex/standard_dex_file.h",
    "src/libdexfile/dex/type_lookup_table.cc",
    "src/libdexfile/dex/type_lookup_table.h",
    "src/libdexfile/dex/utf.cc",
    "src/libdexfile/dex/utf.h",
    "src/libdexfile/dex/utf-inl.h",
    "src/libdexfile/external/dex_file_ext.cc",
    "src/libdexfile/external/dex_file_supp.cc",
    "src/libdexfile/external/include/art_api/dex_file_external.h",
    "src/libdexfile/external/include/art_api/dex_file_support.h",
    "src/libprocinfo/include/procinfo/process_map.h",
    "src/libunwindstack/ArmExidx.cpp",
    "src/libunwindstack/ArmExidx.h",
    "src/libunwindstack/Check.h",
    "src/libunwindstack/DexFile.cpp",
    "src/libunwindstack/DexFile.h",
    "src/libunwindstack/DexFiles.cpp",
    "src/libunwindstack/DwarfCfa.cpp",
    "src/libunwindstack/DwarfCfa.h",
    "src/libunwindstack/DwarfDebugFrame.h",
    "src/libunwindstack/DwarfEhFrame.h",
    "src/libunwindstack/DwarfEhFrameWithHdr.cpp",
    "src/libunwindstack/DwarfEhFrameWithHdr.h",
    "src/libunwindstack/DwarfEncoding.h",
    "src/libunwindstack/DwarfMemory.cpp",
    "src/libunwindstack/DwarfOp.cpp",
    "src/libunwindstack/DwarfOp.h",
    "src/libunwindstack/DwarfSection.cpp",
    "src/libunwindstack/Elf.cpp",
    "src/libunwindstack/ElfInterfaceArm.cpp",
    "src/libunwindstack/ElfInterfaceArm.h",
    "src/libunwindstack/ElfInterface.cpp",
    "src/libunwindstack/Global.cpp",
    "src/libunwindstack/GlobalDebugImpl.h",
    "src/libunwindstack/JitDebug.cpp",
    "src/libunwindstack/LogAndroid.cpp",
    "src/libunwindstack/MapInfo.cpp",
    "src/libunwindstack/Maps.cpp",
    "src/libunwindstack/MemoryBuffer.h",
    "src/libunwindstack/MemoryCache.h",
    "src/libunwindstack/Memory.cpp",
    "src/libunwindstack/MemoryFileAtOffset.h",
    "src/libunwindstack/MemoryLocal.h",
    "src/libunwindstack/MemoryMte.cpp",
    "src/libunwindstack/MemoryOfflineBuffer.h",
    "src/libunwindstack/MemoryOffline.h",
    "src/libunwindstack/MemoryRange.h",
    "src/libunwindstack/MemoryRemote.h",
    "src/libunwindstack/MemoryXz.cpp",
    "src/libunwindstack/MemoryXz.h",
    "src/libunwindstack/RegsArm64.cpp",
    "src/libunwindstack/RegsArm.cpp",
    "src/libunwindstack/Regs.cpp",
    "src/libunwindstack/RegsInfo.h",
    "src/libunwindstack/RegsMips64.cpp",
    "src/libunwindstack/RegsMips.cpp",
    "src/libunwindstack/RegsX86_64.cpp",
    "src/libunwindstack/RegsX86.cpp",
    "src/libunwindstack/Symbols.cpp",
    "src/libunwindstack/Symbols.h",
    "src/libunwindstack/Unwinder.cpp",
  ]
  if (current_cpu == "x86") {
    sources += [ "src/libunwindstack/AsmGetRegsX86.S" ]
  }
  else if (current_cpu == "x64") {
    sources += [ "src/libunwindstack/AsmGetRegsX86_64.S" ]
  }
  deps = [
    "//third_party/lzma_sdk:lzma_sdk_xz",
    "//third_party/zlib:zlib",
  ]
  public_configs = [ ":libunwindstack_config" ]
  configs += [
    ":libdexfile_defines",
    ":warnings",
  ]
}