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 | ], |
Christopher Ferris | 2bf7db3 | 2024-02-26 13:29:20 -0800 | [diff] [blame] | 18 | tidy: false, // crasher.cpp tests many memory access errors |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 19 | srcs: ["crasher.cpp"], |
| 20 | arch: { |
| 21 | arm: { |
| 22 | srcs: ["arm/crashglue.S"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 23 | }, |
| 24 | arm64: { |
| 25 | srcs: ["arm64/crashglue.S"], |
| 26 | }, |
Xia Lifang | b13a10b | 2022-10-12 22:27:54 +0800 | [diff] [blame] | 27 | riscv64: { |
| 28 | srcs: ["riscv64/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", |
Christopher Ferris | 4f600fe | 2022-04-13 14:55:36 -0700 | [diff] [blame] | 48 | ], |
| 49 | static_libs: [ |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 50 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 51 | ], |
| 52 | multilib: { |
| 53 | lib32: { |
| 54 | stem: "crasher", |
| 55 | }, |
| 56 | lib64: { |
| 57 | stem: "crasher64", |
| 58 | }, |
| 59 | }, |
| 60 | } |
| 61 | |
| 62 | cc_binary { |
| 63 | name: "static_crasher", |
| 64 | |
| 65 | defaults: ["crasher-defaults"], |
| 66 | cppflags: ["-DSTATIC_CRASHER"], |
| 67 | static_executable: true, |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 68 | header_libs: ["bionic_libc_platform_headers"], |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 69 | static_libs: [ |
| 70 | "libdebuggerd_handler", |
| 71 | "libbase", |
| 72 | "liblog", |
Elliott Hughes | 12b7129 | 2017-03-02 19:01:20 -0800 | [diff] [blame] | 73 | "libseccomp_policy", |
Elliott Hughes | 0ba5359 | 2017-02-01 16:59:15 -0800 | [diff] [blame] | 74 | ], |
| 75 | multilib: { |
| 76 | lib32: { |
| 77 | stem: "static_crasher", |
| 78 | }, |
| 79 | lib64: { |
| 80 | stem: "static_crasher64", |
| 81 | }, |
| 82 | }, |
| 83 | } |