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", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 16 | "-Wno-date-time", |
| 17 | ], |
| 18 | srcs: ["crasher.cpp"], |
| 19 | arch: { |
| 20 | arm: { |
| 21 | srcs: ["arm/crashglue.S"], |
| 22 | |
Isaac Chen | 6dc21a5 | 2017-09-12 16:49:14 +0800 | [diff] [blame] | 23 | neon: { |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 24 | asflags: ["-DHAS_VFP_D32"], |
| 25 | }, |
| 26 | }, |
| 27 | arm64: { |
| 28 | srcs: ["arm64/crashglue.S"], |
| 29 | }, |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 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 | |
| 40 | cc_binary { |
| 41 | name: "crasher", |
| 42 | |
| 43 | defaults: ["crasher-defaults"], |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 44 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 45 | shared_libs: [ |
| 46 | "libbase", |
| 47 | "liblog", |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 48 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 49 | ], |
| 50 | multilib: { |
| 51 | lib32: { |
| 52 | stem: "crasher", |
| 53 | }, |
| 54 | lib64: { |
| 55 | stem: "crasher64", |
| 56 | }, |
| 57 | }, |
| 58 | } |
| 59 | |
| 60 | cc_binary { |
| 61 | name: "static_crasher", |
| 62 | |
| 63 | defaults: ["crasher-defaults"], |
| 64 | cppflags: ["-DSTATIC_CRASHER"], |
| 65 | static_executable: true, |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 66 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 67 | static_libs: [ |
| 68 | "libdebuggerd_handler", |
| 69 | "libbase", |
| 70 | "liblog", |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 71 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 72 | ], |
| 73 | multilib: { |
| 74 | lib32: { |
| 75 | stem: "static_crasher", |
| 76 | }, |
| 77 | lib64: { |
| 78 | stem: "static_crasher64", |
| 79 | }, |
| 80 | }, |
| 81 | } |