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"], |
Inseob Kim | 6fa8efd | 2021-12-29 13:56:14 +0900 | [diff] [blame] | 14 | stl: "c++_static", |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 15 | |
| 16 | // libsepolwrap gets loaded from the system python, which does not have the |
| 17 | // ASAN runtime. So turn off sanitization for ourself, and use static |
| 18 | // libraries, since the shared libraries will use ASAN. |
Jeff Vander Stoep | 3ca843a | 2017-10-04 09:42:29 -0700 | [diff] [blame] | 19 | static_libs: [ |
| 20 | "libbase", |
| 21 | "libsepol", |
| 22 | ], |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 23 | sanitize: { |
| 24 | never: true, |
| 25 | }, |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 26 | } |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 27 | |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame] | 28 | python_library_host { |
| 29 | name: "mini_cil_parser", |
| 30 | srcs: ["mini_parser.py"], |
| 31 | } |
| 32 | |
| 33 | python_library_host { |
| 34 | name: "pysepolwrap", |
| 35 | srcs: [ |
| 36 | "fc_sort.py", |
| 37 | "policy.py", |
| 38 | ], |
| 39 | } |
| 40 | |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 41 | python_binary_host { |
| 42 | name: "treble_sepolicy_tests", |
| 43 | srcs: [ |
Jeff Vander Stoep | 370a52f | 2018-02-08 09:54:59 -0800 | [diff] [blame] | 44 | "treble_sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 45 | ], |
Inseob Kim | 4912a24 | 2022-07-25 11:30:02 +0900 | [diff] [blame] | 46 | version: { |
| 47 | py3: { |
| 48 | embedded_launcher: true, |
| 49 | }, |
| 50 | }, |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame] | 51 | libs: [ |
| 52 | "mini_cil_parser", |
| 53 | "pysepolwrap", |
| 54 | ], |
Inseob Kim | 6fa8efd | 2021-12-29 13:56:14 +0900 | [diff] [blame] | 55 | data: [":libsepolwrap"], |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | python_binary_host { |
| 59 | name: "sepolicy_tests", |
| 60 | srcs: [ |
Jeff Vander Stoep | 370a52f | 2018-02-08 09:54:59 -0800 | [diff] [blame] | 61 | "sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 62 | ], |
Inseob Kim | 4912a24 | 2022-07-25 11:30:02 +0900 | [diff] [blame] | 63 | version: { |
| 64 | py3: { |
| 65 | embedded_launcher: true, |
| 66 | }, |
| 67 | }, |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame] | 68 | libs: ["pysepolwrap"], |
Inseob Kim | 6fa8efd | 2021-12-29 13:56:14 +0900 | [diff] [blame] | 69 | data: [":libsepolwrap"], |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | python_binary_host { |
Jooyung Han | 23d1e62 | 2023-04-04 18:03:07 +0900 | [diff] [blame] | 73 | name: "apex_sepolicy_tests", |
| 74 | srcs: [ |
| 75 | "apex_sepolicy_tests.py", |
| 76 | ], |
| 77 | version: { |
| 78 | py3: { |
| 79 | embedded_launcher: true, |
| 80 | }, |
| 81 | }, |
| 82 | libs: ["pysepolwrap"], |
| 83 | data: [ |
| 84 | ":libsepolwrap", |
| 85 | ":precompiled_sepolicy", |
| 86 | ], |
| 87 | } |
| 88 | |
| 89 | python_test_host { |
| 90 | name: "apex_sepolicy_tests_test", |
| 91 | srcs: [ |
| 92 | "apex_sepolicy_tests.py", |
| 93 | "apex_sepolicy_tests_test.py", |
| 94 | ], |
| 95 | libs: ["pysepolwrap"], |
| 96 | data: [ |
| 97 | ":libsepolwrap", |
| 98 | ":precompiled_sepolicy", |
| 99 | ], |
| 100 | test_options: { |
| 101 | unit_test: true, |
| 102 | }, |
Jooyung Han | 7ba515a | 2023-04-11 08:30:19 +0900 | [diff] [blame] | 103 | version: { |
| 104 | py3: { |
| 105 | embedded_launcher: true, |
| 106 | }, |
| 107 | }, |
Jooyung Han | 23d1e62 | 2023-04-04 18:03:07 +0900 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | python_binary_host { |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 111 | name: "searchpolicy", |
| 112 | srcs: [ |
Jeff Vander Stoep | 3a3756f | 2018-04-24 11:03:22 -0700 | [diff] [blame] | 113 | "searchpolicy.py", |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 114 | ], |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame] | 115 | libs: ["pysepolwrap"], |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 116 | required: ["libsepolwrap"], |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 117 | } |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 118 | |
| 119 | python_binary_host { |
| 120 | name: "combine_maps", |
| 121 | srcs: [ |
| 122 | "combine_maps.py", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 123 | ], |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame] | 124 | libs: ["mini_cil_parser"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 125 | } |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 126 | |
| 127 | python_binary_host { |
| 128 | name: "fc_sort", |
| 129 | srcs: [ |
| 130 | "fc_sort.py", |
| 131 | ], |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 132 | } |
Inseob Kim | 2bcc045 | 2020-12-21 13:16:44 +0900 | [diff] [blame] | 133 | |
ThiƩbaud Weksteen | b75b4d2 | 2021-11-24 14:44:28 +1100 | [diff] [blame] | 134 | python_test_host { |
| 135 | name: "fc_sort_test", |
| 136 | srcs: [ |
| 137 | "fc_sort.py", |
| 138 | "fc_sort_test.py", |
| 139 | ], |
ThiƩbaud Weksteen | b75b4d2 | 2021-11-24 14:44:28 +1100 | [diff] [blame] | 140 | test_options: { |
| 141 | unit_test: true, |
| 142 | } |
| 143 | } |
| 144 | |
Inseob Kim | 2bcc045 | 2020-12-21 13:16:44 +0900 | [diff] [blame] | 145 | python_binary_host { |
| 146 | name: "check_prop_prefix", |
| 147 | srcs: ["check_prop_prefix.py"], |
| 148 | } |