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 stl: "libc++_static", 15 sanitize: { 16 never: true, 17 }, 18} 19 20python_defaults { 21 name: "py2_only", 22 version: { 23 py2: { 24 embedded_launcher: true, 25 enabled: true, 26 }, 27 py3: { 28 enabled: false, 29 }, 30 }, 31} 32 33python_binary_host { 34 name: "treble_sepolicy_tests", 35 srcs: [ 36 "FcSort.py", 37 "mini_parser.py", 38 "policy.py", 39 "treble_sepolicy_tests.py", 40 ], 41 required: ["libsepolwrap"], 42 defaults: ["py2_only"], 43} 44 45python_binary_host { 46 name: "sepolicy_tests", 47 srcs: [ 48 "FcSort.py", 49 "policy.py", 50 "sepolicy_tests.py", 51 ], 52 required: ["libsepolwrap"], 53 defaults: ["py2_only"], 54} 55 56python_binary_host { 57 name: "searchpolicy", 58 srcs: [ 59 "FcSort.py", 60 "policy.py", 61 "searchpolicy.py", 62 ], 63 required: ["libsepolwrap"], 64 defaults: ["py2_only"], 65} 66