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 | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame^] | 46 | libs: [ |
| 47 | "mini_cil_parser", |
| 48 | "pysepolwrap", |
| 49 | ], |
Inseob Kim | 6fa8efd | 2021-12-29 13:56:14 +0900 | [diff] [blame] | 50 | data: [":libsepolwrap"], |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | python_binary_host { |
| 54 | name: "sepolicy_tests", |
| 55 | srcs: [ |
Jeff Vander Stoep | 370a52f | 2018-02-08 09:54:59 -0800 | [diff] [blame] | 56 | "sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 57 | ], |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame^] | 58 | libs: ["pysepolwrap"], |
Inseob Kim | 6fa8efd | 2021-12-29 13:56:14 +0900 | [diff] [blame] | 59 | data: [":libsepolwrap"], |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | python_binary_host { |
| 63 | name: "searchpolicy", |
| 64 | srcs: [ |
Jeff Vander Stoep | 3a3756f | 2018-04-24 11:03:22 -0700 | [diff] [blame] | 65 | "searchpolicy.py", |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 66 | ], |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame^] | 67 | libs: ["pysepolwrap"], |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 68 | required: ["libsepolwrap"], |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 69 | } |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 70 | |
| 71 | python_binary_host { |
| 72 | name: "combine_maps", |
| 73 | srcs: [ |
| 74 | "combine_maps.py", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 75 | ], |
Inseob Kim | cbc95ea | 2022-01-21 19:32:53 +0900 | [diff] [blame^] | 76 | libs: ["mini_cil_parser"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 77 | } |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 78 | |
| 79 | python_binary_host { |
| 80 | name: "fc_sort", |
| 81 | srcs: [ |
| 82 | "fc_sort.py", |
| 83 | ], |
Jeff Vander Stoep | 1ca7a4c | 2019-04-10 16:53:17 -0700 | [diff] [blame] | 84 | } |
Inseob Kim | 2bcc045 | 2020-12-21 13:16:44 +0900 | [diff] [blame] | 85 | |
ThiƩbaud Weksteen | b75b4d2 | 2021-11-24 14:44:28 +1100 | [diff] [blame] | 86 | python_test_host { |
| 87 | name: "fc_sort_test", |
| 88 | srcs: [ |
| 89 | "fc_sort.py", |
| 90 | "fc_sort_test.py", |
| 91 | ], |
ThiƩbaud Weksteen | b75b4d2 | 2021-11-24 14:44:28 +1100 | [diff] [blame] | 92 | test_options: { |
| 93 | unit_test: true, |
| 94 | } |
| 95 | } |
| 96 | |
Inseob Kim | 2bcc045 | 2020-12-21 13:16:44 +0900 | [diff] [blame] | 97 | python_binary_host { |
| 98 | name: "check_prop_prefix", |
| 99 | srcs: ["check_prop_prefix.py"], |
| 100 | } |