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"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 22 | }, |
| 23 | arm64: { |
| 24 | srcs: ["arm64/crashglue.S"], |
| 25 | }, |
Xia Lifang | b13a10b | 2022-10-12 22:27:54 +0800 | [diff] [blame] | 26 | riscv64: { |
| 27 | srcs: ["riscv64/crashglue.S"], |
| 28 | }, |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 29 | x86: { |
| 30 | srcs: ["x86/crashglue.S"], |
| 31 | }, |
| 32 | x86_64: { |
| 33 | srcs: ["x86_64/crashglue.S"], |
| 34 | }, |
| 35 | }, |
| 36 | compile_multilib: "both", |
| 37 | } |
| 38 | |
| 39 | cc_binary { |
| 40 | name: "crasher", |
| 41 | |
| 42 | defaults: ["crasher-defaults"], |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 43 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 44 | shared_libs: [ |
| 45 | "libbase", |
| 46 | "liblog", |
Christopher Ferris | 4f600fe | 2022-04-13 14:55:36 -0700 | [diff] [blame] | 47 | ], |
| 48 | static_libs: [ |
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 | } |