1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5cc_defaults {
6    name: "crasher-defaults",
7
8    cflags: [
9        "-W",
10        "-Wall",
11        "-Wextra",
12        "-Wunused",
13        "-Werror",
14        "-O0",
15        "-fstack-protector-all",
16        "-Wno-date-time",
17    ],
18    srcs: ["crasher.cpp"],
19    arch: {
20        arm: {
21            srcs: ["arm/crashglue.S"],
22
23            neon: {
24                asflags: ["-DHAS_VFP_D32"],
25            },
26        },
27        arm64: {
28            srcs: ["arm64/crashglue.S"],
29        },
30        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"],
44    header_libs: ["bionic_libc_platform_headers"],
45    shared_libs: [
46        "libbase",
47        "liblog",
48        "libseccomp_policy",
49    ],
50    multilib: {
51        lib32: {
52            stem: "crasher",
53        },
54        lib64: {
55            stem: "crasher64",
56        },
57    },
58}
59
60cc_binary {
61    name: "static_crasher",
62
63    defaults: ["crasher-defaults"],
64    cppflags: ["-DSTATIC_CRASHER"],
65    static_executable: true,
66    header_libs: ["bionic_libc_platform_headers"],
67    static_libs: [
68        "libdebuggerd_handler",
69        "libbase",
70        "liblog",
71        "libseccomp_policy",
72    ],
73    multilib: {
74        lib32: {
75            stem: "static_crasher",
76        },
77        lib64: {
78            stem: "static_crasher64",
79        },
80    },
81}
82