blob: 8ca952dcdd125ee297a02d72a4f8f2b17057e5cd [file] [log] [blame]
Bob Badour601ebb42021-02-03 23:07:40 -08001package {
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 Stoepbdfc0302017-05-25 09:53:47 -07009cc_library_host_shared {
10 name: "libsepolwrap",
11 srcs: ["sepol_wrap.cpp"],
Jeff Vander Stoepbdfc0302017-05-25 09:53:47 -070012 cflags: ["-Wall", "-Werror",],
13 export_include_dirs: ["include"],
Inseob Kim6fa8efd2021-12-29 13:56:14 +090014 stl: "c++_static",
Dan Willemsen948354a2017-09-01 14:08:46 -070015
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 Stoep3ca843a2017-10-04 09:42:29 -070019 static_libs: [
20 "libbase",
21 "libsepol",
22 ],
Dan Willemsen948354a2017-09-01 14:08:46 -070023 sanitize: {
24 never: true,
25 },
Jeff Vander Stoepbdfc0302017-05-25 09:53:47 -070026}
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070027
Inseob Kimcbc95ea2022-01-21 19:32:53 +090028python_library_host {
29 name: "mini_cil_parser",
30 srcs: ["mini_parser.py"],
31}
32
33python_library_host {
34 name: "pysepolwrap",
35 srcs: [
36 "fc_sort.py",
37 "policy.py",
38 ],
39}
40
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070041python_binary_host {
42 name: "treble_sepolicy_tests",
43 srcs: [
Jeff Vander Stoep370a52f2018-02-08 09:54:59 -080044 "treble_sepolicy_tests.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070045 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090046 libs: [
47 "mini_cil_parser",
48 "pysepolwrap",
49 ],
Inseob Kim6fa8efd2021-12-29 13:56:14 +090050 data: [":libsepolwrap"],
Dan Cashman91d398d2017-09-26 12:58:29 -070051}
52
53python_binary_host {
54 name: "sepolicy_tests",
55 srcs: [
Jeff Vander Stoep370a52f2018-02-08 09:54:59 -080056 "sepolicy_tests.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070057 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090058 libs: ["pysepolwrap"],
Inseob Kim6fa8efd2021-12-29 13:56:14 +090059 data: [":libsepolwrap"],
Dan Cashman91d398d2017-09-26 12:58:29 -070060}
61
62python_binary_host {
63 name: "searchpolicy",
64 srcs: [
Jeff Vander Stoep3a3756f2018-04-24 11:03:22 -070065 "searchpolicy.py",
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070066 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090067 libs: ["pysepolwrap"],
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070068 required: ["libsepolwrap"],
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070069}
Tri Vo438684b2018-09-29 17:47:10 -070070
71python_binary_host {
72 name: "combine_maps",
73 srcs: [
74 "combine_maps.py",
Tri Vo438684b2018-09-29 17:47:10 -070075 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090076 libs: ["mini_cil_parser"],
Tri Vo438684b2018-09-29 17:47:10 -070077}
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070078
79python_binary_host {
80 name: "fc_sort",
81 srcs: [
82 "fc_sort.py",
83 ],
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070084}
Inseob Kim2bcc0452020-12-21 13:16:44 +090085
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +110086python_test_host {
87 name: "fc_sort_test",
88 srcs: [
89 "fc_sort.py",
90 "fc_sort_test.py",
91 ],
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +110092 test_options: {
93 unit_test: true,
94 }
95}
96
Inseob Kim2bcc0452020-12-21 13:16:44 +090097python_binary_host {
98 name: "check_prop_prefix",
99 srcs: ["check_prop_prefix.py"],
100}