platform_system_core/debuggerd/Android.bp

585 lines
13 KiB
Text
Raw Normal View History

[LSC] Add LOCAL_LICENSE_KINDS to system/core Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
2021-02-17 04:02:14 +01:00
package {
default_applicable_licenses: ["Android-Apache-2.0"],
[LSC] Add LOCAL_LICENSE_KINDS to system/core Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
2021-02-17 04:02:14 +01:00
}
cc_defaults {
name: "debuggerd_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-gcc-compat",
"-Wno-unused-argument",
"-Wno-unused-function",
"-Wno-nullability-completeness",
"-Wno-reorder-init-list",
"-Os",
"-fno-finite-loops",
"-DANDROID_DEBUGGABLE=0",
],
local_include_dirs: ["include"],
product_variables: {
debuggable: {
cflags: [
"-UANDROID_DEBUGGABLE",
"-DANDROID_DEBUGGABLE=1",
],
},
},
}
cc_library_headers {
name: "libdebuggerd_common_headers",
export_include_dirs: ["common/include"],
recovery_available: true,
vendor_ramdisk_available: true,
apex_available: [
"com.android.runtime",
"com.android.virt",
"//apex_available:platform",
],
}
cc_library_shared {
name: "libtombstoned_client",
defaults: ["debuggerd_defaults"],
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
static_libs: [
"libasync_safe",
],
shared_libs: [
"libbase",
"libcutils",
],
apex_available: [
"com.android.virt",
"//apex_available:platform",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
}
// Utility library to talk to tombstoned and get an output fd.
cc_library_static {
name: "libtombstoned_client_static",
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libbase",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
apex_available: ["com.android.runtime"],
}
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
cc_library_static {
name: "libdebuggerd_handler_core",
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: ["handler/debuggerd_handler.cpp"],
header_libs: [
"libbase_headers",
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
"gwp_asan_headers",
],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libdebuggerd",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["include"],
apex_available: [
"com.android.runtime",
],
}
// Implementation with a no-op fallback.
cc_library_static {
name: "libdebuggerd_handler",
defaults: ["debuggerd_defaults"],
srcs: ["handler/debuggerd_fallback_nop.cpp"],
header_libs: ["bionic_libc_platform_headers"],
export_header_lib_headers: ["bionic_libc_platform_headers"],
whole_static_libs: [
"libdebuggerd_handler_core",
],
export_include_dirs: ["include"],
}
// Fallback implementation, for use in the Bionic linker only.
cc_library_static {
name: "libdebuggerd_handler_fallback",
visibility: ["//bionic/linker"],
apex_available: [
"com.android.runtime",
"//apex_available:platform",
],
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"handler/debuggerd_fallback.cpp",
],
whole_static_libs: [
"libdebuggerd_handler_core",
"libtombstoned_client_static",
"libasync_safe",
"libbase",
"libdebuggerd",
"libunwindstack_no_dex",
"liblzma",
"libcutils",
],
header_libs: ["bionic_libc_platform_headers"],
export_header_lib_headers: ["bionic_libc_platform_headers"],
export_include_dirs: ["include"],
}
cc_library {
name: "libdebuggerd_client",
defaults: ["debuggerd_defaults"],
srcs: [
"client/debuggerd_client.cpp",
"util.cpp",
],
shared_libs: [
"libbase",
"libcutils",
"libprocinfo",
],
header_libs: [
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
],
export_header_lib_headers: [
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
],
export_include_dirs: ["include"],
}
cc_library {
name: "libdebuggerd_tombstone_proto_to_text",
defaults: ["debuggerd_defaults"],
ramdisk_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
local_include_dirs: ["libdebuggerd/include"],
export_include_dirs: ["libdebuggerd/include"],
srcs: [
"libdebuggerd/tombstone_proto_to_text.cpp",
],
header_libs: [
"bionic_libc_platform_headers",
],
static_libs: [
"libbase",
"liblog_for_runtime_apex",
"libunwindstack",
],
whole_static_libs: [
"libtombstone_proto",
"libprotobuf-cpp-lite",
],
apex_available: [
"//apex_available:platform",
"com.android.runtime",
],
}
cc_library_static {
name: "libdebuggerd",
defaults: ["debuggerd_defaults"],
ramdisk_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"libdebuggerd/backtrace.cpp",
"libdebuggerd/gwp_asan.cpp",
"libdebuggerd/open_files_list.cpp",
"libdebuggerd/tombstone.cpp",
"libdebuggerd/tombstone_proto.cpp",
"libdebuggerd/utility.cpp",
],
local_include_dirs: ["libdebuggerd/include"],
export_include_dirs: ["libdebuggerd/include"],
include_dirs: [
// Needed for private/bionic_fdsan.h
"bionic/libc",
],
header_libs: [
"bionic_libc_platform_headers",
"gwp_asan_headers",
"liblog_headers",
],
static_libs: [
"libdexfile_support", // libunwindstack dependency
"libunwindstack",
"liblzma",
"libbase",
"libcutils",
],
whole_static_libs: [
"libdebuggerd_tombstone_proto_to_text",
"libasync_safe",
"gwp_asan_crash_handler",
"libtombstone_proto",
"libprocinfo",
"libprotobuf-cpp-lite",
],
target: {
recovery: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
vendor_ramdisk: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
ramdisk: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
android: {
runtime_libs: [
"libdexfile", // libdexfile_support dependency
],
},
},
product_variables: {
debuggable: {
cflags: ["-DROOT_POSSIBLE"],
},
malloc_not_svelte: {
cflags: ["-DUSE_SCUDO"],
whole_static_libs: ["libscudo"],
srcs: ["libdebuggerd/scudo.cpp"],
header_libs: ["scudo_headers"],
},
},
apex_available: [
"com.android.runtime",
],
}
cc_binary {
name: "pbtombstone",
defaults: ["debuggerd_defaults"],
srcs: ["pbtombstone.cpp"],
static_libs: [
"libbase",
"libdebuggerd",
"liblog",
"libprotobuf-cpp-lite",
"libtombstone_proto",
"libunwindstack",
],
}
cc_test_library {
name: "libcrash_test",
defaults: ["debuggerd_defaults"],
srcs: ["crash_test.cpp"],
}
cc_test {
name: "debuggerd_test",
defaults: ["debuggerd_defaults"],
require_root: true,
cflags: ["-Wno-missing-field-initializers"],
srcs: [
"libdebuggerd/test/dump_memory_test.cpp",
"libdebuggerd/test/elf_fake.cpp",
"libdebuggerd/test/log_fake.cpp",
"libdebuggerd/test/open_files_list_test.cpp",
"libdebuggerd/test/tombstone_proto_to_text_test.cpp",
],
target: {
android: {
srcs: [
"client/debuggerd_client_test.cpp",
"debuggerd_test.cpp",
],
static_libs: [
"libasync_safe",
"libtombstoned_client_static",
],
},
},
sanitize: {
memtag_heap: true,
},
shared_libs: [
"libbase",
"libcutils",
"libdebuggerd_client",
"liblog",
"libnativehelper",
"libunwindstack",
],
static_libs: [
"libdebuggerd",
"libgmock",
"libminijail",
],
header_libs: [
"bionic_libc_platform_headers",
"gwp_asan_headers",
],
local_include_dirs: [
"libdebuggerd",
],
compile_multilib: "both",
multilib: {
lib32: {
stem: "debuggerd_test32",
},
lib64: {
stem: "debuggerd_test64",
},
},
data: [
":libcrash_test",
],
test_suites: ["device-tests"],
}
cc_benchmark {
name: "debuggerd_benchmark",
defaults: ["debuggerd_defaults"],
srcs: ["debuggerd_benchmark.cpp"],
shared_libs: [
"libbase",
"libdebuggerd_client",
],
}
cc_binary {
name: "crash_dump",
srcs: [
"crash_dump.cpp",
"tombstone_handler.cpp",
"util.cpp",
],
defaults: ["debuggerd_defaults"],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
header_libs: [
"bionic_libc_platform_headers",
],
static_libs: [
"libtombstoned_client_static",
"libdebuggerd",
"libcutils",
"libtombstone_proto",
"libprotobuf-cpp-lite",
],
shared_libs: [
"libbase",
"liblog",
"libprocinfo",
"libunwindstack",
],
apex_available: [
"com.android.runtime",
],
// Required for tests.
required: ["crash_dump.policy"],
}
cc_binary {
name: "debuggerd",
srcs: [
"debuggerd.cpp",
],
defaults: ["debuggerd_defaults"],
shared_libs: [
"libbase",
"libdebuggerd_client",
"liblog",
"libprocinfo",
],
local_include_dirs: ["include"],
}
cc_defaults {
name: "tombstoned_defaults",
srcs: [
"util.cpp",
"tombstoned/intercept_manager.cpp",
"tombstoned/tombstoned.cpp",
],
defaults: ["debuggerd_defaults"],
header_libs: [
"bionic_libc_platform_headers",
"libdebuggerd_common_headers",
],
static_libs: [
"libbase",
"libcutils",
"libevent",
"liblog",
],
}
cc_binary {
name: "tombstoned",
defaults: ["tombstoned_defaults"],
init_rc: ["tombstoned/tombstoned.rc"],
}
cc_binary {
name: "tombstoned.microdroid",
defaults: ["tombstoned_defaults"],
init_rc: ["tombstoned/tombstoned.microdroid.rc"],
}
prebuilt_etc {
name: "crash_dump.policy",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "seccomp_policy/crash_dump.arm.policy",
required: [
"crash_dump.policy_other",
],
},
arm64: {
src: "seccomp_policy/crash_dump.arm64.policy",
required: [
"crash_dump.policy_other",
],
},
riscv64: {
src: "seccomp_policy/crash_dump.riscv64.policy",
},
x86: {
src: "seccomp_policy/crash_dump.x86.policy",
required: [
"crash_dump.policy_other",
],
},
x86_64: {
src: "seccomp_policy/crash_dump.x86_64.policy",
required: [
"crash_dump.policy_other",
],
},
},
}
// This installs the "other" architecture (so 32-bit on 64-bit device).
prebuilt_etc {
name: "crash_dump.policy_other",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "seccomp_policy/crash_dump.arm64.policy",
},
arm64: {
src: "seccomp_policy/crash_dump.arm.policy",
},
riscv64: {
enabled: false,
},
x86: {
src: "seccomp_policy/crash_dump.x86_64.policy",
},
x86_64: {
src: "seccomp_policy/crash_dump.x86.policy",
},
},
}