1cc_library_host_shared {
2    name: "libsepolwrap",
3    srcs: ["sepol_wrap.cpp"],
4    cflags: ["-Wall", "-Werror",],
5    export_include_dirs: ["include"],
6
7    // libsepolwrap gets loaded from the system python, which does not have the
8    // ASAN runtime. So turn off sanitization for ourself, and  use static
9    // libraries, since the shared libraries will use ASAN.
10    static_libs: [
11        "libbase",
12        "libsepol",
13    ],
14    sanitize: {
15        never: true,
16    },
17}
18
19python_defaults {
20    name: "py2_only",
21    version: {
22        py2: {
23            embedded_launcher: true,
24            enabled: true,
25        },
26        py3: {
27            enabled: false,
28        },
29    },
30}
31
32python_binary_host {
33    name: "treble_sepolicy_tests",
34    srcs: [
35        "fc_sort.py",
36        "mini_parser.py",
37        "policy.py",
38        "treble_sepolicy_tests.py",
39    ],
40    required: ["libsepolwrap"],
41    defaults: ["py2_only"],
42}
43
44python_binary_host {
45    name: "sepolicy_tests",
46    srcs: [
47        "fc_sort.py",
48        "policy.py",
49        "sepolicy_tests.py",
50    ],
51    required: ["libsepolwrap"],
52    defaults: ["py2_only"],
53}
54
55python_binary_host {
56    name: "searchpolicy",
57    srcs: [
58        "fc_sort.py",
59        "policy.py",
60        "searchpolicy.py",
61    ],
62    required: ["libsepolwrap"],
63    defaults: ["py2_only"],
64}
65
66python_binary_host {
67    name: "combine_maps",
68    srcs: [
69        "combine_maps.py",
70        "mini_parser.py",
71    ],
72    defaults: ["py2_only"],
73}
74
75python_binary_host {
76    name: "fc_sort",
77    srcs: [
78        "fc_sort.py",
79    ],
80    defaults: ["py2_only"],
81}
82