Bob Badour | 601ebb4 | 2021-02-03 23:07:40 -0800 | [diff] [blame] | 1 | package { |
| 2 | // http://go/android-license-faq |
| 3 | // A large-scale-change added 'default_applicable_licenses' to import |
| 4 | // the below license kinds from "system_sepolicy_license": |
| 5 | // SPDX-license-identifier-Apache-2.0 |
| 6 | default_applicable_licenses: ["system_sepolicy_license"], |
| 7 | } |
| 8 | |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 9 | cc_library_host_shared { |
| 10 | name: "libsepolwrap", |
| 11 | srcs: ["sepol_wrap.cpp"], |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 12 | cflags: ["-Wall", "-Werror",], |
| 13 | export_include_dirs: ["include"], |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 14 | |
| 15 | // libsepolwrap gets loaded from the system python, which does not have the |
| 16 | // ASAN runtime. So turn off sanitization for ourself, and use static |
| 17 | // libraries, since the shared libraries will use ASAN. |
Jeff Vander Stoep | 3ca843a | 2017-10-04 09:42:29 -0700 | [diff] [blame] | 18 | static_libs: [ |
| 19 | "libbase", |
| 20 | "libsepol", |
| 21 | ], |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 22 | sanitize: { |
| 23 | never: true, |
| 24 | }, |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 25 | } |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 26 | |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 27 | python_defaults { |
| 28 | name: "py2_only", |
| 29 | version: { |
| 30 | py2: { |
Jeff Vander Stoep | e9777e3 | 2017-09-23 15:11:25 -0700 | [diff] [blame] | 31 | embedded_launcher: true, |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 32 | enabled: true, |
| 33 | }, |
| 34 | py3: { |
| 35 | enabled: false, |
| 36 | }, |
| 37 | }, |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 40 | python_binary_host { |
| 41 | name: "treble_sepolicy_tests", |
| 42 | srcs: [ |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 43 | "fc_sort.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 44 | "mini_parser.py", |
| 45 | "policy.py", |
Jeff Vander Stoep | 370a52f | 2018-02-08 09:54:59 -0800 | [diff] [blame] | 46 | "treble_sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 47 | ], |
| 48 | required: ["libsepolwrap"], |
| 49 | defaults: ["py2_only"], |
| 50 | } |
| 51 | |
| 52 | python_binary_host { |
| 53 | name: "sepolicy_tests", |
| 54 | srcs: [ |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 55 | "fc_sort.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 56 | "policy.py", |
Jeff Vander Stoep | 370a52f | 2018-02-08 09:54:59 -0800 | [diff] [blame] | 57 | "sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 58 | ], |
| 59 | required: ["libsepolwrap"], |
| 60 | defaults: ["py2_only"], |
| 61 | } |
| 62 | |
| 63 | python_binary_host { |
| 64 | name: "searchpolicy", |
| 65 | srcs: [ |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 66 | "fc_sort.py", |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 67 | "policy.py", |
Jeff Vander Stoep | 3a3756f | 2018-04-24 11:03:22 -0700 | [diff] [blame] | 68 | "searchpolicy.py", |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 69 | ], |
| 70 | required: ["libsepolwrap"], |
| 71 | defaults: ["py2_only"], |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 72 | } |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 73 | |
| 74 | python_binary_host { |
| 75 | name: "combine_maps", |
| 76 | srcs: [ |
| 77 | "combine_maps.py", |
| 78 | "mini_parser.py", |
| 79 | ], |
Tri Vo | 2777d18 | 2018-10-04 10:22:46 -0700 | [diff] [blame] | 80 | defaults: ["py2_only"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 81 | } |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 82 | |
| 83 | python_binary_host { |
| 84 | name: "fc_sort", |
| 85 | srcs: [ |
| 86 | "fc_sort.py", |
| 87 | ], |
| 88 | defaults: ["py2_only"], |
| 89 | } |
Inseob Kim | 2bcc045 | 2020-12-21 13:16:44 +0900 | [diff] [blame] | 90 | |
| 91 | python_binary_host { |
| 92 | name: "check_prop_prefix", |
| 93 | srcs: ["check_prop_prefix.py"], |
| 94 | } |