blob: 58d4c4fd2fd3e4126055796677a345602e24abf5 [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"],
Dan Willemsen948354a2017-09-01 14:08:46 -070014
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 Stoep3ca843a2017-10-04 09:42:29 -070018 static_libs: [
19 "libbase",
20 "libsepol",
21 ],
Dan Willemsen948354a2017-09-01 14:08:46 -070022 sanitize: {
23 never: true,
24 },
Jeff Vander Stoepbdfc0302017-05-25 09:53:47 -070025}
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070026
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070027python_defaults {
28 name: "py2_only",
29 version: {
30 py2: {
31 enabled: true,
32 },
33 py3: {
34 enabled: false,
35 },
36 },
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070037}
38
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070039python_binary_host {
40 name: "treble_sepolicy_tests",
41 srcs: [
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070042 "fc_sort.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070043 "mini_parser.py",
44 "policy.py",
Jeff Vander Stoep370a52f2018-02-08 09:54:59 -080045 "treble_sepolicy_tests.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070046 ],
47 required: ["libsepolwrap"],
48 defaults: ["py2_only"],
49}
50
51python_binary_host {
52 name: "sepolicy_tests",
53 srcs: [
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070054 "fc_sort.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070055 "policy.py",
Jeff Vander Stoep370a52f2018-02-08 09:54:59 -080056 "sepolicy_tests.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070057 ],
58 required: ["libsepolwrap"],
59 defaults: ["py2_only"],
60}
61
62python_binary_host {
63 name: "searchpolicy",
64 srcs: [
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070065 "fc_sort.py",
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070066 "policy.py",
Jeff Vander Stoep3a3756f2018-04-24 11:03:22 -070067 "searchpolicy.py",
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070068 ],
69 required: ["libsepolwrap"],
70 defaults: ["py2_only"],
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070071}
Tri Vo438684b2018-09-29 17:47:10 -070072
73python_binary_host {
74 name: "combine_maps",
75 srcs: [
76 "combine_maps.py",
77 "mini_parser.py",
78 ],
Tri Vo2777d182018-10-04 10:22:46 -070079 defaults: ["py2_only"],
Tri Vo438684b2018-09-29 17:47:10 -070080}
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070081
82python_binary_host {
83 name: "fc_sort",
84 srcs: [
85 "fc_sort.py",
86 ],
87 defaults: ["py2_only"],
88}
Inseob Kim2bcc0452020-12-21 13:16:44 +090089
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +110090python_test_host {
91 name: "fc_sort_test",
92 srcs: [
93 "fc_sort.py",
94 "fc_sort_test.py",
95 ],
96 defaults: ["py2_only"],
97 test_options: {
98 unit_test: true,
99 }
100}
101
Inseob Kim2bcc0452020-12-21 13:16:44 +0900102python_binary_host {
103 name: "check_prop_prefix",
104 srcs: ["check_prop_prefix.py"],
105}