platform_system_core/debuggerd/crasher/Android.bp
Christopher Ferris 4f600fe073 Add two new crash commands.
One is intentionally seeting the abort message. The other is to set
the abort message to null.

Also, make the libseccomp_policy static so that the crasher
executable can be copied to the system afterwards without
requiring libseccomp_policy.so.

Test: Ran both new crash commands on device.
Test: Ran the seccomp crash command to verify seccomp still works.
Change-Id: I255b5f37e6eb188719e5b72302ca3f5911c8d821
2022-04-13 16:38:16 -07:00

83 lines
1.5 KiB
Text

package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_defaults {
name: "crasher-defaults",
cflags: [
"-W",
"-Wall",
"-Wextra",
"-Wunused",
"-Werror",
"-O0",
"-fstack-protector-all",
"-Wno-date-time",
],
srcs: ["crasher.cpp"],
arch: {
arm: {
srcs: ["arm/crashglue.S"],
neon: {
asflags: ["-DHAS_VFP_D32"],
},
},
arm64: {
srcs: ["arm64/crashglue.S"],
},
x86: {
srcs: ["x86/crashglue.S"],
},
x86_64: {
srcs: ["x86_64/crashglue.S"],
},
},
compile_multilib: "both",
}
cc_binary {
name: "crasher",
defaults: ["crasher-defaults"],
header_libs: ["bionic_libc_platform_headers"],
shared_libs: [
"libbase",
"liblog",
],
static_libs: [
"libseccomp_policy",
],
multilib: {
lib32: {
stem: "crasher",
},
lib64: {
stem: "crasher64",
},
},
}
cc_binary {
name: "static_crasher",
defaults: ["crasher-defaults"],
cppflags: ["-DSTATIC_CRASHER"],
static_executable: true,
header_libs: ["bionic_libc_platform_headers"],
static_libs: [
"libdebuggerd_handler",
"libbase",
"liblog",
"libseccomp_policy",
],
multilib: {
lib32: {
stem: "static_crasher",
},
lib64: {
stem: "static_crasher64",
},
},
}