2017-01-20 12:08:48 +08:00
|
|
|
//
|
|
|
|
// Copyright (C) 2017 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_flags",
|
|
|
|
|
|
|
|
host_supported: true,
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wextra",
|
|
|
|
],
|
2017-01-31 05:45:16 +08:00
|
|
|
|
|
|
|
target: {
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2017-02-02 07:44:40 +08:00
|
|
|
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
suffix: "32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
suffix: "64",
|
|
|
|
},
|
|
|
|
},
|
2017-01-20 12:08:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_common",
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"ArmExidx.cpp",
|
2017-04-25 02:14:39 +08:00
|
|
|
"DwarfCfa.cpp",
|
2017-03-22 03:41:17 +08:00
|
|
|
"DwarfMemory.cpp",
|
2017-04-05 01:41:31 +08:00
|
|
|
"DwarfOp.cpp",
|
2017-02-02 07:44:40 +08:00
|
|
|
"Elf.cpp",
|
|
|
|
"ElfInterface.cpp",
|
|
|
|
"ElfInterfaceArm.cpp",
|
2017-01-20 12:08:48 +08:00
|
|
|
"Log.cpp",
|
2017-02-02 07:44:40 +08:00
|
|
|
"Regs.cpp",
|
2017-04-20 06:42:19 +08:00
|
|
|
"MapInfo.cpp",
|
2017-04-06 04:25:04 +08:00
|
|
|
"Maps.cpp",
|
2017-02-02 07:44:40 +08:00
|
|
|
"Memory.cpp",
|
2017-04-05 05:06:58 +08:00
|
|
|
"Symbols.cpp",
|
2017-01-20 12:08:48 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
name: "libunwindstack",
|
|
|
|
defaults: ["libunwindstack_common"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
name: "libunwindstack_debug",
|
|
|
|
defaults: ["libunwindstack_common"],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-UNDEBUG",
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// Unit Tests
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_test_common",
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/ArmExidxDecodeTest.cpp",
|
|
|
|
"tests/ArmExidxExtractTest.cpp",
|
2017-04-25 02:14:39 +08:00
|
|
|
"tests/DwarfCfaLogTest.cpp",
|
|
|
|
"tests/DwarfCfaTest.cpp",
|
2017-03-22 03:41:17 +08:00
|
|
|
"tests/DwarfMemoryTest.cpp",
|
2017-04-05 01:41:31 +08:00
|
|
|
"tests/DwarfOpLogTest.cpp",
|
|
|
|
"tests/DwarfOpTest.cpp",
|
2017-02-02 07:44:40 +08:00
|
|
|
"tests/ElfInterfaceArmTest.cpp",
|
|
|
|
"tests/ElfInterfaceTest.cpp",
|
|
|
|
"tests/ElfTest.cpp",
|
2017-01-20 12:08:48 +08:00
|
|
|
"tests/LogFake.cpp",
|
2017-04-20 06:42:19 +08:00
|
|
|
"tests/MapInfoTest.cpp",
|
2017-04-06 04:25:04 +08:00
|
|
|
"tests/MapsTest.cpp",
|
2017-01-20 12:08:48 +08:00
|
|
|
"tests/MemoryFake.cpp",
|
|
|
|
"tests/MemoryFileTest.cpp",
|
|
|
|
"tests/MemoryLocalTest.cpp",
|
|
|
|
"tests/MemoryRangeTest.cpp",
|
|
|
|
"tests/MemoryRemoteTest.cpp",
|
|
|
|
"tests/RegsTest.cpp",
|
2017-04-05 05:06:58 +08:00
|
|
|
"tests/SymbolsTest.cpp",
|
2017-01-20 12:08:48 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
linux: {
|
|
|
|
host_ldlibs: [
|
|
|
|
"-lrt",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// These unit tests run against the shared library.
|
|
|
|
cc_test {
|
|
|
|
name: "libunwindstack_test",
|
|
|
|
defaults: ["libunwindstack_test_common"],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libunwindstack",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// These unit tests run against the static debug library.
|
|
|
|
cc_test {
|
|
|
|
name: "libunwindstack_test_debug",
|
|
|
|
defaults: ["libunwindstack_test_common"],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libunwindstack_debug",
|
|
|
|
],
|
|
|
|
}
|
2017-02-02 07:44:40 +08:00
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// Utility Executables
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_executables",
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libunwindstack",
|
|
|
|
"libbase",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "unwind_info",
|
|
|
|
defaults: ["libunwindstack_executables"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"unwind_info.cpp",
|
|
|
|
],
|
|
|
|
}
|