Bob Badour | d69ad69 | 2021-02-16 19:02:14 -0800 | [diff] [blame^] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 5 | cc_defaults { |
| 6 | name: "crasher-defaults", |
| 7 | |
Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 8 | cflags: [ |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 9 | "-W", |
| 10 | "-Wall", |
| 11 | "-Wextra", |
| 12 | "-Wunused", |
| 13 | "-Werror", |
| 14 | "-O0", |
| 15 | "-fstack-protector-all", |
| 16 | "-Wno-free-nonheap-object", |
| 17 | "-Wno-date-time", |
| 18 | ], |
| 19 | srcs: ["crasher.cpp"], |
| 20 | arch: { |
| 21 | arm: { |
| 22 | srcs: ["arm/crashglue.S"], |
| 23 | |
Isaac Chen | 6dc21a5 | 2017-09-12 16:49:14 +0800 | [diff] [blame] | 24 | neon: { |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 25 | asflags: ["-DHAS_VFP_D32"], |
| 26 | }, |
| 27 | }, |
| 28 | arm64: { |
| 29 | srcs: ["arm64/crashglue.S"], |
| 30 | }, |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 31 | x86: { |
| 32 | srcs: ["x86/crashglue.S"], |
| 33 | }, |
| 34 | x86_64: { |
| 35 | srcs: ["x86_64/crashglue.S"], |
| 36 | }, |
| 37 | }, |
| 38 | compile_multilib: "both", |
| 39 | } |
| 40 | |
| 41 | cc_binary { |
| 42 | name: "crasher", |
| 43 | |
| 44 | defaults: ["crasher-defaults"], |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 45 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 46 | shared_libs: [ |
| 47 | "libbase", |
| 48 | "liblog", |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 49 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 50 | ], |
| 51 | multilib: { |
| 52 | lib32: { |
| 53 | stem: "crasher", |
| 54 | }, |
| 55 | lib64: { |
| 56 | stem: "crasher64", |
| 57 | }, |
| 58 | }, |
| 59 | } |
| 60 | |
| 61 | cc_binary { |
| 62 | name: "static_crasher", |
| 63 | |
| 64 | defaults: ["crasher-defaults"], |
| 65 | cppflags: ["-DSTATIC_CRASHER"], |
| 66 | static_executable: true, |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 67 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 68 | static_libs: [ |
| 69 | "libdebuggerd_handler", |
| 70 | "libbase", |
| 71 | "liblog", |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 72 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 73 | ], |
| 74 | multilib: { |
| 75 | lib32: { |
| 76 | stem: "static_crasher", |
| 77 | }, |
| 78 | lib64: { |
| 79 | stem: "static_crasher64", |
| 80 | }, |
| 81 | }, |
| 82 | } |