blob: f9a897dafba9e01a2beb27bc61bd52ff051304f9 [file] [log] [blame]
# 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("libunwindstack_config") {
cflags = [
"-I",
rebase_path("src/libunwindstack/include", root_build_dir),
]
# We don't need .dex file support.
defines = [ "NO_LIBDEXFILE_SUPPORT" ]
}
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/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/file.h",
"src/android-base/include/android-base/macros.h",
"src/android-base/include/android-base/off64_t.h",
"src/android-base/include/android-base/stringprintf.h",
"src/android-base/include/android-base/strings.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/stringprintf.cpp",
"src/android-base/strings.cpp",
"src/android-base/threads.cpp",
"src/libprocinfo/include/procinfo/process_map.h",
"src/libunwindstack/ArmExidx.cpp",
"src/libunwindstack/ArmExidx.h",
"src/libunwindstack/Check.h",
"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",
]
public_configs = [ ":libunwindstack_config" ]
configs += [ ":warnings" ]
}