blob: e2713461cc6b2ae6042b3ff5559688e7a608c229 [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 {
73 name: "searchpolicy",
74 srcs: [
Jeff Vander Stoep3a3756f2018-04-24 11:03:22 -070075 "searchpolicy.py",
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070076 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090077 libs: ["pysepolwrap"],
Jeff Vander Stoepa7d2c5b2017-09-23 14:42:50 -070078 required: ["libsepolwrap"],
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -070079}
Tri Vo438684b2018-09-29 17:47:10 -070080
81python_binary_host {
82 name: "combine_maps",
83 srcs: [
84 "combine_maps.py",
Tri Vo438684b2018-09-29 17:47:10 -070085 ],
Inseob Kimcbc95ea2022-01-21 19:32:53 +090086 libs: ["mini_cil_parser"],
Tri Vo438684b2018-09-29 17:47:10 -070087}
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070088
89python_binary_host {
90 name: "fc_sort",
91 srcs: [
92 "fc_sort.py",
93 ],
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -070094}
Inseob Kim2bcc0452020-12-21 13:16:44 +090095
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +110096python_test_host {
97 name: "fc_sort_test",
98 srcs: [
99 "fc_sort.py",
100 "fc_sort_test.py",
101 ],
ThiƩbaud Weksteenb75b4d22021-11-24 14:44:28 +1100102 test_options: {
103 unit_test: true,
104 }
105}
106
Inseob Kim2bcc0452020-12-21 13:16:44 +0900107python_binary_host {
108 name: "check_prop_prefix",
109 srcs: ["check_prop_prefix.py"],
110}