| # 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", |
| "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include", |
| "//third_party/zstd/src/lib", |
| ] |
| |
| public = [ |
| "src/libunwindstack/include/GlobalDebugInterface.h", |
| "src/libunwindstack/include/unwindstack/Arch.h", |
| "src/libunwindstack/include/unwindstack/Demangle.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/MachineArm.h", |
| "src/libunwindstack/include/unwindstack/MachineArm64.h", |
| "src/libunwindstack/include/unwindstack/MachineX86.h", |
| "src/libunwindstack/include/unwindstack/MachineX86_64.h", |
| "src/libunwindstack/include/unwindstack/MapInfo.h", |
| "src/libunwindstack/include/unwindstack/Maps.h", |
| "src/libunwindstack/include/unwindstack/Memory.h", |
| "src/libunwindstack/include/unwindstack/Regs.h", |
| "src/libunwindstack/include/unwindstack/RegsArm.h", |
| "src/libunwindstack/include/unwindstack/RegsArm64.h", |
| "src/libunwindstack/include/unwindstack/RegsRiscv64.h", |
| "src/libunwindstack/include/unwindstack/RegsX86.h", |
| "src/libunwindstack/include/unwindstack/RegsX86_64.h", |
| "src/libunwindstack/include/unwindstack/SharedString.h", |
| "src/libunwindstack/include/unwindstack/UcontextArm.h", |
| "src/libunwindstack/include/unwindstack/UcontextArm64.h", |
| "src/libunwindstack/include/unwindstack/UcontextX86.h", |
| "src/libunwindstack/include/unwindstack/UcontextX86_64.h", |
| "src/libunwindstack/include/unwindstack/Unwinder.h", |
| "src/libunwindstack/include/unwindstack/UserArm.h", |
| "src/libunwindstack/include/unwindstack/UserArm64.h", |
| "src/libunwindstack/include/unwindstack/UserX86.h", |
| "src/libunwindstack/include/unwindstack/UserX86_64.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/allocator.h", |
| "src/libartbase/base/array_ref.h", |
| "src/libartbase/base/atomic.h", |
| "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/file_magic.cc", |
| "src/libartbase/base/file_magic.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/logging.h", |
| "src/libartbase/base/macros.h", |
| "src/libartbase/base/mem_map.cc", |
| "src/libartbase/base/mem_map.h", |
| "src/libartbase/base/mem_map_unix.cc", |
| "src/libartbase/base/memory_tool.h", |
| "src/libartbase/base/mman.h", |
| "src/libartbase/base/os.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/unix_file/fd_file.cc", |
| "src/libartbase/base/unix_file/fd_file.h", |
| "src/libartbase/base/utils.h", |
| "src/libartbase/base/utils.h", |
| "src/libartbase/base/value_object.h", |
| "src/libdexfile/dex/class_accessor-inl.h", |
| "src/libdexfile/dex/class_accessor.h", |
| "src/libdexfile/dex/class_iterator.h", |
| "src/libdexfile/dex/code_item_accessors-inl.h", |
| "src/libdexfile/dex/code_item_accessors.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-inl.h", |
| "src/libdexfile/dex/dex_file.cc", |
| "src/libdexfile/dex/dex_file.h", |
| "src/libdexfile/dex/dex_file_exception_helpers.cc", |
| "src/libdexfile/dex/dex_file_exception_helpers.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-inl.h", |
| "src/libdexfile/dex/dex_instruction.cc", |
| "src/libdexfile/dex/dex_instruction.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-inl.h", |
| "src/libdexfile/dex/signature.cc", |
| "src/libdexfile/dex/signature.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-inl.h", |
| "src/libdexfile/dex/utf.cc", |
| "src/libdexfile/dex/utf.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/Demangle.cpp", |
| "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/ElfInterface.cpp", |
| "src/libunwindstack/ElfInterfaceArm.cpp", |
| "src/libunwindstack/ElfInterfaceArm.h", |
| "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/Memory.cpp", |
| "src/libunwindstack/MemoryBuffer.h", |
| "src/libunwindstack/MemoryCache.h", |
| "src/libunwindstack/MemoryFileAtOffset.h", |
| "src/libunwindstack/MemoryLocal.h", |
| "src/libunwindstack/MemoryLocalUnsafe.h", |
| "src/libunwindstack/MemoryMte.cpp", |
| "src/libunwindstack/MemoryOffline.h", |
| "src/libunwindstack/MemoryOfflineBuffer.h", |
| "src/libunwindstack/MemoryRange.h", |
| "src/libunwindstack/MemoryRemote.h", |
| "src/libunwindstack/MemoryXz.cpp", |
| "src/libunwindstack/MemoryXz.h", |
| "src/libunwindstack/Regs.cpp", |
| "src/libunwindstack/RegsArm.cpp", |
| "src/libunwindstack/RegsArm64.cpp", |
| "src/libunwindstack/RegsInfo.h", |
| "src/libunwindstack/RegsRiscv64.cpp", |
| "src/libunwindstack/RegsX86.cpp", |
| "src/libunwindstack/RegsX86_64.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/rust/rustc_demangle_capi/v0_1:lib", |
| "//third_party/zlib:zlib", |
| "//third_party/zstd:decompress", |
| ] |
| public_configs = [ ":libunwindstack_config" ] |
| configs += [ |
| ":libdexfile_defines", |
| ":warnings", |
| ] |
| } |