blob: 4c6a400a1d7b30f72ed5d78dd924970b70856cf5 [file] [log] [blame]
Bob Badourd69ad692021-02-16 19:02:14 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Elliott Hughes0ba53592017-02-01 16:59:15 -08005cc_defaults {
6 name: "crasher-defaults",
7
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -07008 cflags: [
Elliott Hughes0ba53592017-02-01 16:59:15 -08009 "-W",
10 "-Wall",
11 "-Wextra",
12 "-Wunused",
13 "-Werror",
14 "-O0",
15 "-fstack-protector-all",
Elliott Hughes0ba53592017-02-01 16:59:15 -080016 "-Wno-date-time",
17 ],
Christopher Ferris2bf7db32024-02-26 13:29:20 -080018 tidy: false, // crasher.cpp tests many memory access errors
Elliott Hughes0ba53592017-02-01 16:59:15 -080019 srcs: ["crasher.cpp"],
20 arch: {
21 arm: {
22 srcs: ["arm/crashglue.S"],
Elliott Hughes0ba53592017-02-01 16:59:15 -080023 },
24 arm64: {
25 srcs: ["arm64/crashglue.S"],
26 },
Xia Lifangb13a10b2022-10-12 22:27:54 +080027 riscv64: {
28 srcs: ["riscv64/crashglue.S"],
29 },
Elliott Hughes0ba53592017-02-01 16:59:15 -080030 x86: {
31 srcs: ["x86/crashglue.S"],
32 },
33 x86_64: {
34 srcs: ["x86_64/crashglue.S"],
35 },
36 },
37 compile_multilib: "both",
38}
39
40cc_binary {
41 name: "crasher",
42
43 defaults: ["crasher-defaults"],
Josh Gaoa48b41b2019-12-13 14:11:04 -080044 header_libs: ["bionic_libc_platform_headers"],
Elliott Hughes0ba53592017-02-01 16:59:15 -080045 shared_libs: [
46 "libbase",
47 "liblog",
Christopher Ferris4f600fe2022-04-13 14:55:36 -070048 ],
49 static_libs: [
Elliott Hughes12b71292017-03-02 19:01:20 -080050 "libseccomp_policy",
Elliott Hughes0ba53592017-02-01 16:59:15 -080051 ],
52 multilib: {
53 lib32: {
54 stem: "crasher",
55 },
56 lib64: {
57 stem: "crasher64",
58 },
59 },
60}
61
62cc_binary {
63 name: "static_crasher",
64
65 defaults: ["crasher-defaults"],
66 cppflags: ["-DSTATIC_CRASHER"],
67 static_executable: true,
Josh Gaoa48b41b2019-12-13 14:11:04 -080068 header_libs: ["bionic_libc_platform_headers"],
Elliott Hughes0ba53592017-02-01 16:59:15 -080069 static_libs: [
70 "libdebuggerd_handler",
71 "libbase",
72 "liblog",
Elliott Hughes12b71292017-03-02 19:01:20 -080073 "libseccomp_policy",
Elliott Hughes0ba53592017-02-01 16:59:15 -080074 ],
75 multilib: {
76 lib32: {
77 stem: "static_crasher",
78 },
79 lib64: {
80 stem: "static_crasher64",
81 },
82 },
83}