blob: 544db3758fe904f5a2cf81e1e22e5034f1119d40 [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 Kim4912a242022-07-25 11:30:02 +090046 version: {
47 py3: {
48 embedded_launcher: true,
49 },
50 },
Inseob Kimcbc95ea2022-01-21 19:32:53 +090051 libs: [
52 "mini_cil_parser",
53 "pysepolwrap",
54 ],
Inseob Kim6fa8efd2021-12-29 13:56:14 +090055 data: [":libsepolwrap"],
Dan Cashman91d398d2017-09-26 12:58:29 -070056}
57
58python_binary_host {
59 name: "sepolicy_tests",
60 srcs: [
Jeff Vander Stoep370a52f2018-02-08 09:54:59 -080061 "sepolicy_tests.py",
Dan Cashman91d398d2017-09-26 12:58:29 -070062 ],
Inseob Kim4912a242022-07-25 11:30:02 +090063 version: {
64 py3: {
65 embedded_launcher: true,
66 },
67 },
Inseob Kimcbc95ea2022-01-21 19:32:53 +090068 libs: ["pysepolwrap"],
Inseob Kim6fa8efd2021-12-29 13:56:14 +090069 data: [":libsepolwrap"],
Dan Cashman91d398d2017-09-26 12:58:29 -070070}
71
72python_binary_host {
Jooyung Han23d1e622023-04-04 18:03:07 +090073 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
89python_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 Han7ba515a2023-04-11 08:30:19 +0900103 version: {
104 py3: {
105 embedded_launcher: true,
106 },
107 },
Jooyung Han23d1e622023-04-04 18:03:07 +0900108}
109
110python_binary_host {
Dan Cashman91d398d2017-09-26 12:58:29 -0700111 name: "searchpolicy",
112 srcs: [
Jeff Vander Stoep3a3756f2018-04-24 11:03:22 -0700113 "searchpolicy.py",
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -0700114 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +0900115 libs: ["pysepolwrap"],
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -0700116 required: ["libsepolwrap"],
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -0700117}
Tri Vo438684b2018-09-29 17:47:10 -0700118
119python_binary_host {
120 name: "combine_maps",
121 srcs: [
122 "combine_maps.py",
Tri Vo438684b2018-09-29 17:47:10 -0700123 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +0900124 libs: ["mini_cil_parser"],
Tri Vo438684b2018-09-29 17:47:10 -0700125}
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -0700126
127python_binary_host {
128 name: "fc_sort",
129 srcs: [
130 "fc_sort.py",
131 ],
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -0700132}
Inseob Kim2bcc0452020-12-21 13:16:44 +0900133
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +1100134python_test_host {
135 name: "fc_sort_test",
136 srcs: [
137 "fc_sort.py",
138 "fc_sort_test.py",
139 ],
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +1100140 test_options: {
141 unit_test: true,
142 }
143}
144
Inseob Kim2bcc0452020-12-21 13:16:44 +0900145python_binary_host {
146 name: "check_prop_prefix",
147 srcs: ["check_prop_prefix.py"],
148}
Inseob Kim36d9d392023-09-04 17:40:03 +0900149
150python_binary_host {
151 name: "sepolicy_freeze_test",
152 srcs: [
153 "sepolicy_freeze_test.py",
154 ],
155 version: {
156 py3: {
157 embedded_launcher: true,
158 },
159 },
160 libs: [
161 "mini_cil_parser",
162 ],
163}